Prepare package ci/cd pipeline#6
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR prepares the project for publishing via CI/CD by moving build outputs into artifacts/, updating package metadata for a scoped npm package, and extending the GitHub Actions workflow to publish to npm and create GitHub releases.
Changes:
- Move Rollup outputs (and generated
.d.ts) underartifacts/and stop tracking built/minified files in the repo root. - Update docs/examples to reference
artifacts/*and the new npm package name@codeuctivity/qr-scanner. - Enhance CI workflow to derive a release version, publish to npm with provenance, and attach artifacts to GitHub releases.
Reviewed changes
Copilot reviewed 6 out of 19 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
types/qr-scanner.d.ts |
Removes tracked root declaration file (now generated into artifacts/types). |
rollup.config.js |
Updates output paths to emit bundles into artifacts/. |
README.md |
Updates installation/setup guidance and artifact paths. |
qr-scanner.min.js |
Removes tracked built bundle from repo root. |
qr-scanner.min.js.map |
Removes tracked source map from repo root. |
qr-scanner.umd.min.js |
Removes tracked UMD bundle from repo root. |
qr-scanner.legacy.min.js |
Removes tracked legacy bundle from repo root. |
qr-scanner.legacy.min.js.map |
Removes tracked legacy source map from repo root. |
qr-scanner-worker.min.js |
Removes tracked worker bundle from repo root. |
playwright/fixtures/qr-camera-harness.html |
Updates integration harness import to artifacts/ bundle path. |
demo/index.html |
Updates demo import to artifacts/ bundle path. |
package.json |
Renames package to scoped name, updates entrypoints/types, adds pack/publish-related scripts and publish config. |
package-lock.json |
Updates lock metadata to match new package name/version. |
nimiq_logo_rgb_horizontal.svg |
Removes sponsor asset no longer referenced by README. |
artifacts/.gitkeep |
Keeps empty artifacts/ directory in git. |
.gitignore |
Ignores generated artifacts/* while keeping .gitkeep. |
.github/workflows/build.yml |
Adds npm publishing (with provenance) and attaches built artifacts to GitHub releases. |
Comments suppressed due to low confidence (1)
.github/workflows/build.yml:77
- The derived npm version uses only
GITHUB_RUN_NUMBERfor the patch segment. If this workflow run is re-run,GITHUB_RUN_NUMBERstays the same, sonpm publishwill attempt to publish an already-existing version and the release job will fail. IncludeGITHUB_RUN_ATTEMPT(or another unique value) in the derived version to make retries publishable (or skip publishing on reruns).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+22
to
25
| "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
67
to
69
| <script type="module"> | ||
| import QrScanner from "../qr-scanner.min.js"; | ||
| import QrScanner from "../artifacts/qr-scanner.min.js"; | ||
|
|
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>
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.