@pioneercompany/app-sdk 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -16,6 +16,10 @@ Consumers do not need a token or a custom registry for this public package.
16
16
  GitHub Actions publishes through npm Trusted Publishing (OIDC), without a stored
17
17
  publish secret. First-time package creation and the exact npm trust settings are
18
18
  documented in the publishing guide.
19
+ `SDK PR checks` builds and tests pull requests targeting main.
20
+ `Publish SDK to npm` independently builds and publishes the tagged source for
21
+ version tags such as `v0.1.1`. It does not run tests or require PR results.
22
+ Pushes and merges to main do not start either workflow.
19
23
 
20
24
  ```ts
21
25
  import { connectApp } from '@pioneercompany/app-sdk/client';
@@ -4,26 +4,53 @@ Source and CI live at https://github.com/pioneerdotai/pioneer-app-sdk-ts.
4
4
  The package is `@pioneercompany/app-sdk`, published publicly to
5
5
  `https://registry.npmjs.org`. Installing it needs no authentication or custom
6
6
  registry configuration. The previous local archive used `@pioneer/app-sdk`;
7
- update imports when switching a consumer to the registry package. This setup
8
- does not alter Terminal's already installed local archive.
7
+ update imports when switching a consumer to the registry package.
9
8
 
10
9
  ## Workflow
11
10
 
12
- `.github/workflows/package.yml` builds ESM/CJS on pull requests targeting main,
13
- runs source tests and built-package acceptance tests, and saves the npm archive.
14
- Pushes to main, including merged PRs, perform those checks and then publish the
15
- tested archive. Publication uses npm Trusted Publishing through GitHub Actions
16
- OIDC, not a stored npm token. Only the main-only publish job has id-token:write.
17
- Pull requests and manual workflow runs do not publish. npm 11.21.0 is installed
11
+ There are two independent workflows:
12
+
13
+ - **SDK PR checks** (`.github/workflows/ci.yml`) runs only on pull requests
14
+ targeting main. It builds ESM/CJS and runs source tests and built-package
15
+ acceptance tests.
16
+ - **Publish SDK to npm** (`.github/workflows/package.yml`) runs only when a
17
+ release tag such as `v0.1.1` is pushed. It checks out that tag, validates the
18
+ version, installs dependencies from the lockfile, builds ESM/CJS, packs and
19
+ publishes the SDK. It does not run tests or depend on PR checks or artifacts.
20
+
21
+ Pushes and merges to main do not start either workflow. There is no manual
22
+ workflow trigger. The publishing workflow is independent of the PR workflow.
23
+
24
+ Publication uses npm Trusted Publishing through GitHub Actions OIDC, not a
25
+ stored npm token. Only the publish workflow has id-token:write. npm 11.21.0 is installed
18
26
  in that job explicitly, and satisfies the OIDC minimum version. No NODE_AUTH_TOKEN,
19
27
  NPM_TOKEN, personal GitHub token or GitHub Packages access is needed.
20
28
 
21
- Every main push receives a unique version such as `0.1.0-main.42.1`: the base
22
- version from package.json, workflow run number and attempt. The workflow does
23
- not commit version changes or create tags. These are continuous main builds.
24
- A successful build of the current main head updates npm's `latest` tag. Older
25
- or superseded runs publish under the `main` tag without changing latest. A
26
- retry gets a new attempt suffix. Both entry points are in the same archive.
29
+ The version comes directly from package.json, and the tag must exactly match
30
+ `v` plus that version. Only stable `vX.Y.Z` tags are supported; malformed or
31
+ mismatched tags fail before installing SDK dependencies. There are no generated main versions,
32
+ automatic version commits or automatic Git tags. Both entry points are in the
33
+ same archive, published publicly under npm's `latest` tag. A published version
34
+ cannot be replaced; use a new version and tag for the next release.
35
+
36
+ ## Release a version
37
+
38
+ 1. Set package.json's version to the next release, for example `0.1.1`, and
39
+ commit that change. Other changes may be merged before releasing.
40
+ 2. Tag the desired main commit and push that tag:
41
+
42
+ ```sh
43
+ git fetch origin
44
+ git tag v0.1.1 origin/main
45
+ git push origin v0.1.1
46
+ ```
47
+
48
+ 3. **Publish SDK to npm** validates the version, builds and packs the tagged
49
+ source, then publishes `0.1.1` without running tests.
50
+ Do not move an existing release tag. Rerunning a failed publish can reuse
51
+ the tag if that version has not reached npm; an already published version
52
+ cannot be published again. A rerun uses the workflow from the original tag;
53
+ changes to main do not update an existing tag's workflow.
27
54
 
28
55
  ## One-time maintainer setup
29
56
 
@@ -41,12 +68,12 @@ retry gets a new attempt suffix. Both entry points are in the same archive.
41
68
  bun x npm@11.21.0 publish --ignore-scripts --access public --registry=https://registry.npmjs.org
42
69
  ```
43
70
 
44
- Complete the browser/2FA prompts. This creates the initial source version,
45
- currently 0.1.0. Do not create a reusable publish token or store one in GitHub.
46
- If using an already packed archive, publish that reviewed archive explicitly;
47
- then rerun all CI jobs, not only the publish job, to generate a fresh version.
71
+ Complete the browser/2FA prompts. This creates the initial source version.
72
+ Do not create a reusable publish token or store one in GitHub.
73
+ If using an already packed archive, publish that reviewed archive explicitly.
74
+ The first automated release must use a new version and matching tag.
48
75
  Skip this step if you already manage this package on npm.
49
- 3. Put `.github/workflows/package.yml` and the SDK source in the GitHub repository.
76
+ 3. Put both workflow files and the SDK source in the GitHub repository.
50
77
  In npmjs.com → app-sdk → Settings → Trusted publishing, add GitHub Actions:
51
78
 
52
79
  | Field | Value |
@@ -57,20 +84,20 @@ retry gets a new attempt suffix. Both entry points are in the same archive.
57
84
  | Environment name | Leave empty; this workflow uses no GitHub environment |
58
85
  | Allowed actions | Enable direct `npm publish`, not only staging |
59
86
 
60
- 4. Merge a PR to main, or rerun all jobs of a failed main run, within two days
87
+ 4. Push a new release tag, or rerun a failed tag publication, within two days
61
88
  after adding the trusted publisher. npm requires a first successful OIDC
62
89
  publication in this period to validate the repository identity; if it expires,
63
- delete and recreate the connection. Once validated, later main merges publish
64
- automatically. Changing the workflow filename requires a matching new npm
90
+ delete and recreate the connection. Once validated, later release tags publish
91
+ automatically from their tagged source; main merges start no workflows.
92
+ Changing the publishing workflow filename requires a matching new npm
65
93
  trusted publisher configuration.
66
94
  5. After successful OIDC publication, set the package's Publishing access to
67
95
  **Require two-factor authentication and disallow tokens**. Trusted publishing
68
96
  continues to work. Revoke an automation token or remove an NPM_TOKEN secret
69
97
  only if one was previously created for this SDK and is no longer used.
70
98
 
71
- No repository secrets need to be added. GITHUB_TOKEN is supplied by GitHub and
72
- only reads the current main commit to prevent older builds replacing latest.
73
- The npm publish credential is short-lived and obtained through OIDC. For a public
99
+ No repository secrets need to be added. The npm publish credential is short-lived
100
+ and obtained through OIDC. For a public
74
101
  package from this public repository, npm also generates provenance automatically.
75
102
 
76
103
  ## Install
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pioneercompany/app-sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Pioneer application client and Node.js backend SDK",
5
5
  "repository": { "type": "git", "url": "git+https://github.com/pioneerdotai/pioneer-app-sdk-ts.git" },
6
6
  "homepage": "https://github.com/pioneerdotai/pioneer-app-sdk-ts#readme",