Commit c5f10ae
Release: Add npm publishing and update documentation (#719)
* Changes required by Gorelase version > 2
* npm-publish script supports conditional publishing.
If gorelease in not in "Release" mode, npm packages are not pushed, so we can avoid multitudes of snapshot packages being pushed to public registry
* Create npm packages after goreleaser via a hook script
The hook runs after. If goreaser is not in release mode, npm will build in dry-run mode, so the packages are not pushed to registry
* Update documentation with NPM installation instructions
* Switch npm package scope to @kosli
* Fix: Add the missing bin/kosli JS Shim
* Fix: Token Variable Mismatch
* Fix: Silent Postinstall Failures
* Update npm/README.md
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
* refactor(npm-publish): replace sed/perl with jq and harden publish script
- Use jq instead of sed/perl for JSON version updates (portable across
macOS and Linux, handles JSON correctly)
- Separate pack and publish into two distinct phases so all packages are
packed before any are published
- Add npm_publish_with_retry with exponential backoff (3 attempts)
- Fail fast with clear error messages on pack or publish failure
* Fix: Frontmatter formatting
* Consistent formatting of package.json files
* Include npm packages in binary provenance processing
* Add directory and engines specification to packages
* Documention updates:
- npx is not supported
- package @kosli/cli should be used to install
* Fix three issues in npm postinstall and publish script
- postinstall: exit 1 on unsupported platform to match bin/kosli shim behaviour
- npm-publish.sh: use process substitution instead of pipe to while loop so set -e catches failures inside the loop
- npm-publish.sh: fix out-of-scope max_attempts variable in publish error message
* Update scripts/npm-publish.sh
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
* Integrate npm package build and publish into GoReleaser pipeline
- Copy each platform binary into its npm package dir via per-build post hooks
- Run npm-publish.sh after release (dry-run on snapshots) via after hook
- Clean npm bin dirs and tarballs before each build via before hooks
* Update scripts/npm-publish.sh
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
* Update scripts/npm-publish.sh
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
* Update scripts/npm-publish.sh
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
* Update scripts/npm-publish.sh
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
* Add --provenance flag to npm publish when running in GitHub Actions
* Fix temp file leak and add npm provenance in GitHub Actions
- Clean up temp file on jq/mv failure for wrapper package.json update,
consistent with the platform loop
- Pass --provenance to npm publish when running in GitHub Actions
* Added distribution: goreleaser-pro and GORELEASER_KEY: ${{ secrets.KOSLI_GORELEASERPRO }} — that's the standard way the goreleaser-action picks up the pro license.
* Add npm installation test job to install-script-tests workflow
- Test npm install -g @kosli/cli on all 6 supported platforms
- Trigger on release (published) to test newly published packages
- Also trigger on push/PR to npm/**, .goreleaser.yml, and scripts/npm-publish.sh
* Select npm tag snapshot for now
* Removed macos-13. macos-13 is the only GitHub-hosted x64 macOS runner but it's not available in all GitHub org configuration
* Refine dry-run condition in npm-publish script for clarity
* Add prepack scripts to fail fast when binary is missing
npm pack silently succeeds even if the binary is absent, producing a
broken package. Each platform package now checks for bin/kosli (or
bin/kosli.exe on Windows) before packing; the wrapper also checks for
install.js.
* Exclude node_modules from package.json search in npm-publish script
* Refactor binary validation in postinstall script to use fs.accessSync for executable check to address @dangrondahl ai review kosli version false negatives in install.js
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>1 parent 639eb41 commit c5f10ae
89 files changed
Lines changed: 261 additions & 254 deletions
File tree
- docs.kosli.com
- assets
- content
- client_reference
- legacy_ref
- v2.12.0
- v2.12.1
- v2.13.0
- v2.13.1
- v2.13.2
- v2.14.0
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Lines changed: 89 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
This file was deleted.
Lines changed: 0 additions & 57 deletions
This file was deleted.
Lines changed: 0 additions & 71 deletions
This file was deleted.
Lines changed: 0 additions & 69 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
0 commit comments