Conversation
Migrate CI and tooling to npm
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Prepare package ci/cd pipeline
There was a problem hiding this comment.
Pull request overview
This PR migrates the project’s build/test/release pipeline from Yarn to npm, restructures distributable outputs under artifacts/, and updates packaging + documentation to support publishing the scoped npm package @codeuctivity/qr-scanner.
Changes:
- Switch dependency management to npm (
package-lock.json, removeyarn.lock) and update CI to usenpm ci. - Emit build outputs and generated typings into
artifacts/, stop committing built bundles to the repo, and update Rollup + consumers accordingly. - Add a multi-OS CI workflow with a release job that builds, packs, publishes to npm, and creates a GitHub release.
Reviewed changes
Copilot reviewed 8 out of 22 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
yarn.lock |
Removed Yarn lockfile as part of npm migration. |
types/qr-scanner.d.ts |
Removed committed typings; now generated into artifacts/types/ during build. |
rollup.config.js |
Redirect build outputs to artifacts/ and adjust legacy inlining alias to point at the worker artifact. |
README.md |
Update installation/build instructions and file paths to reflect scoped package + artifacts/ layout. |
qr-scanner.umd.min.js |
Removed committed build artifact (now generated into artifacts/). |
qr-scanner.min.js |
Removed committed build artifact (now generated into artifacts/). |
qr-scanner.legacy.min.js |
Removed committed build artifact (now generated into artifacts/). |
qr-scanner.legacy.min.js.map |
Removed committed build artifact (now generated into artifacts/). |
qr-scanner-worker.min.js |
Removed committed build artifact (now generated into artifacts/). |
playwright/fixtures/qr-camera-harness.html |
Update integration harness import to /artifacts/qr-scanner.min.js. |
package.json |
Rename to @codeuctivity/qr-scanner, publish artifacts/*, add prepack and local packing script, and set npm publish config. |
package-lock.json |
Added npm lockfile for reproducible installs and CI npm ci. |
nimiq_logo_rgb_horizontal.svg |
Removed unused/legacy branding asset (and corresponding README references). |
demo/index.html |
Update demo imports to load from ../artifacts/. |
artifacts/.gitkeep |
Ensure artifacts/ directory exists in git even though contents are ignored. |
.gitignore |
Ignore generated artifacts/* outputs while keeping .gitkeep. |
.github/workflows/release-branch.yml |
Removed old single-workflow release pipeline. |
.github/workflows/build.yml |
Added new multi-OS build/test workflow plus release-branch publish + GitHub release job. |
.github/dependabot.yml |
Enable weekly npm + GitHub Actions dependency update checks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
21
to
25
| "scripts": { | ||
| "build": "rollup --config && tsc src/qr-scanner.ts --target esnext --module esnext --declaration --declarationDir types --emitDeclarationOnly", | ||
| "build": "rollup --config && tsc src/qr-scanner.ts --target esnext --module esnext --declaration --declarationDir artifacts/types --emitDeclarationOnly", | ||
| "prepack": "npm run build", | ||
| "pack:local": "npm pack --pack-destination artifacts", | ||
| "test:integration": "playwright test" |
Comment on lines
+100
to
+104
| echo "package_tgz=${PACKAGE_TGZ}" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Publish to npm | ||
| run: npm publish --access public --provenance | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.