Fast link extraction in MDX files.
npm install @qiskit/mdx-link-extractFast link extraction in MDX files. This package was created specifically for Qiskit/documentation.
After the first release of the package, you should be able to install it like any other npm package:
``bash`
npm install @qiskit/mdx-link-extractor
yarn add @qiskit/mdx-link-extract
- Install rustc ~= 1.88. We recommend using rustup to install it.node >= 22.21
- Install . We recommend using Node version manager (nvm).
- nvm use 22.21.1yarn install
- yarn build
- yarn test
-
You should see all the tests pass.
Our GitHub Action prebuilds a binary for each supported platform. We release different npm packages for each platform and add them to optionalDependencies before releasing the major package to npm. The package manager will choose which native package to download from the registry automatically.
The process isn't ideal for our workflow, we inherited it from the napi-rs template. The release action looks for a new commit on main that starts with a valid semver number (such as 4.12.3). Since we only allow merge commits, this means we need to merge a PR with the semver as a title. We also need to update the package.json in the same PR.
Follow these steps for a foolproof way to make a new release:
1. Make a new branch from up-to-date main.`
sh`
git switch -c release && git reset --hard origin/main && git pull origin main
package.json
2. Run the following command to update and make a commit:
`bash`
npm version [
3. Run gh pr create and accept the defaults. This will create a PR with the correct title. Submit the PR.
4. Once CI has passed and been approved, merge the PR. This will trigger a release.
> WARN: Don't run npm publish` manually.