Skip to content

Migrate CI to npm and prepare package release#7

Merged
stesee merged 6 commits into
releasefrom
main
Jun 20, 2026
Merged

Migrate CI to npm and prepare package release#7
stesee merged 6 commits into
releasefrom
main

Conversation

@stesee

@stesee stesee commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

stesee and others added 6 commits June 20, 2026 00:53
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>
Copilot AI review requested due to automatic review settings June 20, 2026 18:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, remove yarn.lock) and update CI to use npm 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 thread package.json
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

@stesee stesee merged commit cd5db0f into release Jun 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants