Skip to content

Commit 35317c9

Browse files
committed
revert: restore GitHub Packages publishing, drop npm publish changes
1 parent 1f0ac73 commit 35317c9

4 files changed

Lines changed: 31 additions & 20 deletions

File tree

.github/workflows/release.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
permissions:
1818
contents: write
1919
id-token: write
20+
packages: write
2021

2122
steps:
2223
- name: Checkout
@@ -30,7 +31,6 @@ jobs:
3031
with:
3132
node-version: 24.x
3233
cache: npm
33-
registry-url: https://registry.npmjs.org
3434

3535
- name: Install dependencies
3636
run: npm ci
@@ -158,20 +158,22 @@ jobs:
158158
--notes "${RELEASE_BODY}" \
159159
${PRERELEASE_FLAG}
160160
161+
- name: Setup Node.js for publishing
162+
if: steps.should_release.outputs.needed == 'true'
163+
uses: actions/setup-node@v4
164+
with:
165+
node-version: 24.x
166+
registry-url: https://npm.pkg.github.com
167+
161168
- name: Build package
162169
if: steps.should_release.outputs.needed == 'true'
163170
run: npm run build
164171

165-
- name: Publish to npm
172+
- name: Publish to GitHub Packages
166173
if: steps.should_release.outputs.needed == 'true'
167174
env:
168-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
175+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
169176
run: |
170-
if [ -z "$NODE_AUTH_TOKEN" ]; then
171-
echo "::warning::NPM_TOKEN secret is not set — skipping npm publish"
172-
exit 0
173-
fi
174-
175177
NPM_TAG="latest"
176178
if [ "${{ steps.prerelease.outputs.value }}" = "true" ]; then
177179
NPM_TAG="next"
@@ -185,7 +187,7 @@ jobs:
185187
echo "## Release Summary" >> $GITHUB_STEP_SUMMARY
186188
echo "- **Version**: ${{ steps.pkg_version.outputs.tag }}" >> $GITHUB_STEP_SUMMARY
187189
echo "- **Prerelease**: ${{ steps.prerelease.outputs.value }}" >> $GITHUB_STEP_SUMMARY
188-
echo "- **npm tag**: ${{ steps.prerelease.outputs.value == 'true' && 'next' || 'latest' }}" >> $GITHUB_STEP_SUMMARY
190+
echo "- **GitHub Packages tag**: ${{ steps.prerelease.outputs.value == 'true' && 'next' || 'latest' }}" >> $GITHUB_STEP_SUMMARY
189191
190192
- name: No release needed
191193
if: steps.should_release.outputs.needed != 'true'

README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
1-
# @scope3/observability-js
1+
# @scope3data/observability-js
22

33
Unified observability for Node.js services. A single `init()` call wires up [Sentry](https://sentry.io) (error monitoring, tracing, and profiling), [Pyroscope](https://pyroscope.io) (continuous CPU and heap profiling), and optionally the [OpenTelemetry](https://opentelemetry.io) SDK with OTLP trace export.
44

55
## Installation
66

7+
This package is published to [GitHub Packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry). Ensure your project has a `.npmrc` with the `@scope3data` scope configured:
8+
9+
```
10+
@scope3data:registry=https://npm.pkg.github.com
11+
//npm.pkg.github.com/:_authToken=${PACKAGES_ACCESS_TOKEN}
12+
```
13+
14+
Then install:
15+
716
```sh
8-
npm install @scope3/observability-js
17+
npm install @scope3data/observability-js
918
```
1019

1120
Requires Node.js >= 24.
@@ -20,7 +29,7 @@ Without this, `instrument.js` (which calls `init()`) and `server.js` (which uses
2029

2130
```js
2231
const EXTERNAL_PACKAGES = [
23-
'@scope3/observability-js',
32+
'@scope3data/observability-js',
2433
// ...
2534
]
2635
```
@@ -32,7 +41,7 @@ This is not required when running with a dev server (e.g. `tsx`) since Node's mo
3241
Call `init()` once at process startup, before anything else runs:
3342

3443
```ts
35-
import { init } from '@scope3/observability-js'
44+
import { init } from '@scope3data/observability-js'
3645

3746
init({
3847
serviceName: 'my-service',
@@ -246,7 +255,7 @@ All span helpers are safe to call without `init()` having been called first. Whe
246255
In your library, pass your library name as the `tracerName` argument to any span helper. Do not call `init()` — that is the responsibility of the consuming application.
247256

248257
```ts
249-
import { startSpan, setSpanAttributes } from '@scope3/observability-js'
258+
import { startSpan, setSpanAttributes } from '@scope3data/observability-js'
250259

251260
async function executeToolCall(toolName: string, agentId: string, params: unknown) {
252261
return startSpan(

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@scope3/observability-js",
2+
"name": "@scope3data/observability-js",
33
"version": "1.0.0",
44
"description": "Unified observability (Sentry, OpenTelemetry, Pyroscope) for Node.js services",
55
"keywords": [
@@ -40,8 +40,7 @@
4040
"test": "vitest run",
4141
"test:ci": "vitest run --reporter=verbose",
4242
"prepare": "husky",
43-
"prepublishOnly": "npm run build",
44-
"publish:npm": "npm publish --ignore-scripts --tag latest"
43+
"prepublishOnly": "npm run build"
4544
},
4645
"lint-staged": {
4746
"*.{js,ts,cjs,mjs,json,jsonc}": [
@@ -74,6 +73,7 @@
7473
"node": ">= 24"
7574
},
7675
"publishConfig": {
77-
"access": "public"
76+
"@scope3data:registry": "https://npm.pkg.github.com",
77+
"registry": "https://npm.pkg.github.com"
7878
}
7979
}

0 commit comments

Comments
 (0)