Fast 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:
npm install @qiskit/mdx-link-extract
# or
yarn add @qiskit/mdx-link-extract- Install
rustc ~= 1.88. We recommend usingrustupto install it. - Install
node >= 22.21. We recommend using Node version manager (nvm).
nvm use 22.21.1yarn installyarn buildyarn 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:
-
Make a new branch from up-to-date
main.git switch -c release && git reset --hard origin/main && git pull origin main
-
Run the following command to update
package.jsonand make a commit:npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease [--preid=<prerelease-id>] | from-git]
-
Run
gh pr createand accept the defaults. This will create a PR with the correct title. Submit the PR. -
Once CI has passed and been approved, merge the PR. This will trigger a release.
WARN: Don't run
npm publishmanually.