From ef5d7027c5abaa3de2c841fab3b8642daa4f4430 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 17 Apr 2026 00:38:02 +0000 Subject: [PATCH] =?UTF-8?q?feat(publish):=20Sprint=201.2=20=E2=80=94=20ESM?= =?UTF-8?q?-only=20publish-readiness=20for=20all=20@sigops/*=20packages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flip all 6 packages to ESM-only dist exports + version 1.0.0 + publishConfig pointing at npmjs.com (public). Mirrors cluster-shared Sprint 1.1 pattern. Changes per package: - version: 0.1.0 → 1.0.0 - main/module → ./dist/index.js (was ./dist/index.cjs — broken: tsc doesn't emit .cjs, so the advertised CJS entry point never existed on disk) - exports: remove 'require' condition; reorder to types-first (ESM-only) - Add repository field (directory: packages/) — needed for publish - Add publishConfig { registry: https://registry.npmjs.org, access: public } Exceptions: - @sigops/cli renamed to @sigops/dev-cli + bin renamed to 'sigops-dev' to avoid conflict with the standalone sigops-cli repo that reserves the 'sigops' command. Rename is safe because this package has never been published. - @sigops/vscode-ext marked private (ships via VS Code Marketplace via vsce, not npm). Still gets version bump + repository field. Also adds .github/workflows/publish.yml — tag-triggered (v*.*.*) + manual dispatch. Uses 'packageManager' field in root package.json as source of truth for pnpm version (no 'version:' input to pnpm/action-setup — lesson from cluster-shared PR #6). Filters vscode-ext out of publish command. https://claude.ai/code/session_01VZPc4xQECHmaTddwaq6zf2 --- .github/workflows/publish.yml | 32 ++++++++++++++++++++++++++++++ packages/cli/package.json | 26 +++++++++++++++--------- packages/plugin-sdk/package.json | 18 ++++++++++++----- packages/sel-tools/package.json | 18 ++++++++++++----- packages/template-sdk/package.json | 18 ++++++++++++----- packages/tool-sdk/package.json | 18 ++++++++++++----- packages/vscode-ext/package.json | 15 +++++++++----- 7 files changed, 111 insertions(+), 34 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..ae883af --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,32 @@ +name: Publish + +on: + push: + tags: ['v*.*.*'] + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 + # Version intentionally omitted — resolved from the `packageManager` + # field in root package.json. Avoids the "Multiple versions of pnpm + # specified" error (see cluster-shared PR #6). + - uses: actions/setup-node@v4 + with: + node-version: '20' + registry-url: 'https://registry.npmjs.org' + cache: 'pnpm' + - run: pnpm install --frozen-lockfile + - run: pnpm -r build + - run: pnpm -r test + - name: Publish to npm (public) + run: pnpm -r --filter='!@sigops/vscode-ext' publish --access public --no-git-checks + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/packages/cli/package.json b/packages/cli/package.json index 2823e8f..beaa941 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,28 +1,36 @@ { - "name": "@sigops/cli", - "version": "0.1.0", - "description": "CLI for SigOps SDK - init, test, validate, publish tools and templates", + "name": "@sigops/dev-cli", + "version": "1.0.0", + "description": "Developer CLI for the SigOps SDK - init, test, validate, publish tools and templates", "type": "module", - "main": "./dist/index.cjs", + "main": "./dist/index.js", "module": "./dist/index.js", "types": "./dist/index.d.ts", "bin": { - "sigops": "./dist/index.js" + "sigops-dev": "./dist/index.js" }, "exports": { ".": { - "import": "./dist/index.js", - "require": "./dist/index.cjs", - "types": "./dist/index.d.ts" + "types": "./dist/index.d.ts", + "import": "./dist/index.js" } }, "files": ["dist"], + "repository": { + "type": "git", + "url": "https://github.com/diskhacker/sigops-sdk.git", + "directory": "packages/cli" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org", + "access": "public" + }, "scripts": { "build": "tsc --outDir dist --declaration", "test": "vitest run", "test:coverage": "vitest run --coverage", "lint": "tsc --noEmit" }, - "keywords": ["sigops", "cli"], + "keywords": ["sigops", "cli", "sdk"], "license": "MIT" } diff --git a/packages/plugin-sdk/package.json b/packages/plugin-sdk/package.json index de6c0bb..facffb3 100644 --- a/packages/plugin-sdk/package.json +++ b/packages/plugin-sdk/package.json @@ -1,19 +1,27 @@ { "name": "@sigops/plugin-sdk", - "version": "0.1.0", + "version": "1.0.0", "description": "Plugin SDK for building SigOps extensions and integrations", "type": "module", - "main": "./dist/index.cjs", + "main": "./dist/index.js", "module": "./dist/index.js", "types": "./dist/index.d.ts", "exports": { ".": { - "import": "./dist/index.js", - "require": "./dist/index.cjs", - "types": "./dist/index.d.ts" + "types": "./dist/index.d.ts", + "import": "./dist/index.js" } }, "files": ["dist"], + "repository": { + "type": "git", + "url": "https://github.com/diskhacker/sigops-sdk.git", + "directory": "packages/plugin-sdk" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org", + "access": "public" + }, "scripts": { "build": "tsc --outDir dist --declaration", "test": "vitest run", diff --git a/packages/sel-tools/package.json b/packages/sel-tools/package.json index c1f20d1..9e5b806 100644 --- a/packages/sel-tools/package.json +++ b/packages/sel-tools/package.json @@ -1,19 +1,27 @@ { "name": "@sigops/sel-tools", - "version": "0.1.0", + "version": "1.0.0", "description": "SEL parser, linter, formatter, and LSP for SigOps Expression Language", "type": "module", - "main": "./dist/index.cjs", + "main": "./dist/index.js", "module": "./dist/index.js", "types": "./dist/index.d.ts", "exports": { ".": { - "import": "./dist/index.js", - "require": "./dist/index.cjs", - "types": "./dist/index.d.ts" + "types": "./dist/index.d.ts", + "import": "./dist/index.js" } }, "files": ["dist"], + "repository": { + "type": "git", + "url": "https://github.com/diskhacker/sigops-sdk.git", + "directory": "packages/sel-tools" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org", + "access": "public" + }, "scripts": { "build": "tsc --outDir dist --declaration", "test": "vitest run", diff --git a/packages/template-sdk/package.json b/packages/template-sdk/package.json index 22f8821..93e7433 100644 --- a/packages/template-sdk/package.json +++ b/packages/template-sdk/package.json @@ -1,19 +1,27 @@ { "name": "@sigops/template-sdk", - "version": "0.1.0", + "version": "1.0.0", "description": "Template SDK for building SigOps automation templates", "type": "module", - "main": "./dist/index.cjs", + "main": "./dist/index.js", "module": "./dist/index.js", "types": "./dist/index.d.ts", "exports": { ".": { - "import": "./dist/index.js", - "require": "./dist/index.cjs", - "types": "./dist/index.d.ts" + "types": "./dist/index.d.ts", + "import": "./dist/index.js" } }, "files": ["dist"], + "repository": { + "type": "git", + "url": "https://github.com/diskhacker/sigops-sdk.git", + "directory": "packages/template-sdk" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org", + "access": "public" + }, "scripts": { "build": "tsc --outDir dist --declaration", "test": "vitest run", diff --git a/packages/tool-sdk/package.json b/packages/tool-sdk/package.json index 08907d8..59e12b8 100644 --- a/packages/tool-sdk/package.json +++ b/packages/tool-sdk/package.json @@ -1,19 +1,27 @@ { "name": "@sigops/tool-sdk", - "version": "0.1.0", + "version": "1.0.0", "description": "Tool SDK for building SigOps automation tools", "type": "module", - "main": "./dist/index.cjs", + "main": "./dist/index.js", "module": "./dist/index.js", "types": "./dist/index.d.ts", "exports": { ".": { - "import": "./dist/index.js", - "require": "./dist/index.cjs", - "types": "./dist/index.d.ts" + "types": "./dist/index.d.ts", + "import": "./dist/index.js" } }, "files": ["dist"], + "repository": { + "type": "git", + "url": "https://github.com/diskhacker/sigops-sdk.git", + "directory": "packages/tool-sdk" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org", + "access": "public" + }, "scripts": { "build": "tsc --outDir dist --declaration", "test": "vitest run", diff --git a/packages/vscode-ext/package.json b/packages/vscode-ext/package.json index 516f3c7..378dead 100644 --- a/packages/vscode-ext/package.json +++ b/packages/vscode-ext/package.json @@ -1,19 +1,24 @@ { "name": "@sigops/vscode-ext", - "version": "0.1.0", + "version": "1.0.0", "description": "VS Code extension for SigOps Expression Language (SEL)", "type": "module", - "main": "./dist/index.cjs", + "main": "./dist/index.js", "module": "./dist/index.js", "types": "./dist/index.d.ts", + "private": true, "exports": { ".": { - "import": "./dist/index.js", - "require": "./dist/index.cjs", - "types": "./dist/index.d.ts" + "types": "./dist/index.d.ts", + "import": "./dist/index.js" } }, "files": ["dist"], + "repository": { + "type": "git", + "url": "https://github.com/diskhacker/sigops-sdk.git", + "directory": "packages/vscode-ext" + }, "scripts": { "build": "tsc --outDir dist --declaration", "test": "vitest run",