Repository navigation
[NA] Publish the SDK to npm as @comet-ml/javascript-sdk 2.0.0 - #1
Merged
Merged
Conversation
Nothing is published by this commit; publishing starts when a MAJOR.MINOR.PATCH tag is pushed and the npm side is set up. - package.json: version 1.2.0 (the latest tag is 1.1.24), ship the browser bundle (build/comet-javascript-sdk.js) and point jsDelivr and unpkg at it, fix the repository URL and keywords, publish publicly with provenance; prepublishOnly also runs the bundle test - .npmrc: `npm version` tags plain 1.2.0, the format Jenkins expects - Add the MIT LICENSE that package.json declares (wording as comet-llm) - .github/workflows/release.yml: on a version tag, check the tag matches package.json and build/ and docs/ are current, then npm publish (trusted publishing or an NPM_TOKEN secret), in the `npm` environment - scripts/check-package.js (npm run test:package, run in CI): packs the package, checks its files, installs the tarball, and loads it - README: npm and npm-CDN installation, and the release steps Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Under the new comet-ml npm org, matching the GitHub org. Only the package name changes: the bundle is still build/comet-javascript-sdk.js, the file name Jenkins, the CDN, and the frontend use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…token Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Version 2.0.0: behavior changes since 1.1.24 (get(ws/proj/key) rejects an unknown key and finds archived experiments; experimentsByProjectName requires a workspace; errors carry .status; the browser bundle has no polyfills) plus 13 new methods, ProjectPanel, and the npm package - Release workflow refuses a tag whose commit is not on master - No npm provenance: npm can't generate it for a private repository - README: release by bumping the version in a PR, then tagging master Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From 2.0.0 the SDK is released to npm only; the Comet app embeds the bundle (npm run sync-frontend), so nothing needs cdn.comet.ml any more. - Remove scripts/Jenkinsfile, and scripts/release-tag.sh with its test (only Jenkins used it; release.yml takes the tag from the push itself) - README: one release path; panels embed the SDK rather than loading /js/comet-javascript-sdk-latest.js; drop the on-prem CDN version list; note that 1.1.x releases were on cdn.comet.ml only - Comments in ci.yml, release.yml, .npmrc, and the webpack config Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
BAZ review |
The publish job had id-token: write (npm trusted publishing) while it ran `npm ci` and the tests, so any dependency's code ran with the right to mint a publish token. Now: - build (no credentials): checks the tag is on master and matches package.json, that build/ and docs/ are current; installs with --ignore-scripts; lints, tests, runs the package check; packs the tarball as an artifact - publish (npm environment, id-token): downloads that tarball and runs `npm publish --ignore-scripts` on it; no checkout, no dependencies, no package scripts check-package.js installs with --ignore-scripts too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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.
Re-opened from comet-ml/comet-javascript-sdk-archive#59; this repository starts a fresh history.
What
Makes the SDK publishable to npm as
@comet-ml/javascript-sdk, version 2.0.0. Nothing is published by merging this: publishing starts only when a2.0.0tag is pushed on master, and it waits for approval in thenpmenvironment.package.json: name@comet-ml/javascript-sdk, version 2.0.0. The package now includes the browser bundlebuild/comet-javascript-sdk.js, and jsDelivr/unpkg serve it for the bare package URL. Also fixes the repository URL and keywords, and setspublishConfig.access: public.LICENSE: the MIT licensepackage.jsonalready declared (wording as comet-llm)..github/workflows/release.yml: on aMAJOR.MINOR.PATCHtag it checks that:package.json;build/anddocs/are up to date.It then runs the tests and
npm publish, using trusted publishing or anNPM_TOKENsecret. Actions are pinned to commit SHAs.scripts/check-package.js(npm run test:package, run in CI): packs the package without publishing, checks which files it contains, installs the tarball into an empty project, and loads bothrequire()and the bundle.README: npm and jsDelivr installation, and the release steps.
No more CDN release: npm is the only release. Removed are
scripts/Jenkinsfile, plusscripts/release-tag.shand its test, which only Jenkins used. Also dropped are the README'scdn.comet.mlrelease steps and the on-prem CDN version list. The Comet app embeds the bundle vianpm run sync-frontend. Releases up to 1.1.24 stay oncdn.comet.ml.The bundle filename stays
comet-javascript-sdk.js, so the frontend'ssync-frontendcopy is unaffected.Why 2.0.0
No methods were removed, but some behavior changed since 1.1.24:
get('ws/proj/key')now rejects an unknown key (it used to resolveundefined) and finds archived experiments.experimentsByProjectNamerequires a workspace.Errorwith.status.It also adds 13 new API methods and
Comet.ProjectPanel(see comet-ml/comet-javascript-sdk-archive#58).Before the first publish (repo/npm settings, not code)
comet-mlnpm org, and turn on 2FA.NPM_TOKENsecret with publish rights to@comet-ml, then switch to npm trusted publishing after the first release.npmenvironment with required reviewers.Testing
npm run lint,npm run format:check,npm test(68 passing),npm run test:bundle,npm run test:package(comet-ml-javascript-sdk-2.0.0.tgz, 28 files, 33 KB).🤖 Generated with Claude Code