From 13b99407840e2f3ce513a65ad6c51712883c1b64 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 22 May 2026 00:08:22 +0000 Subject: [PATCH 1/4] Deprecate @sigmacomputing/plugin in favor of @sigmacomputing/plugin-sdk Rename the existing package in packages/plugin-sdk to @sigmacomputing/plugin-sdk, and add a new packages/plugin workspace that keeps the @sigmacomputing/plugin name as a thin compatibility shim. The shim depends on @sigmacomputing/plugin-sdk, re-exports its entire public API, and emits a console.warn at import time directing consumers to migrate. --- packages/plugin-sdk/package.json | 2 +- packages/plugin/README.md | 37 +++++++++++++++++++++ packages/plugin/package.json | 52 ++++++++++++++++++++++++++++++ packages/plugin/src/index.ts | 6 ++++ packages/plugin/tsconfig.app.json | 7 ++++ packages/plugin/tsconfig.json | 12 +++++++ packages/plugin/tsconfig.node.json | 7 ++++ packages/plugin/tsdown.config.ts | 29 +++++++++++++++++ 8 files changed, 151 insertions(+), 1 deletion(-) create mode 100644 packages/plugin/README.md create mode 100644 packages/plugin/package.json create mode 100644 packages/plugin/src/index.ts create mode 100644 packages/plugin/tsconfig.app.json create mode 100644 packages/plugin/tsconfig.json create mode 100644 packages/plugin/tsconfig.node.json create mode 100644 packages/plugin/tsdown.config.ts diff --git a/packages/plugin-sdk/package.json b/packages/plugin-sdk/package.json index 5098326..6c105c6 100644 --- a/packages/plugin-sdk/package.json +++ b/packages/plugin-sdk/package.json @@ -1,5 +1,5 @@ { - "name": "@sigmacomputing/plugin", + "name": "@sigmacomputing/plugin-sdk", "version": "1.2.0", "description": "Sigma Computing Plugin Client SDK", "license": "MIT", diff --git a/packages/plugin/README.md b/packages/plugin/README.md new file mode 100644 index 0000000..46a6e0b --- /dev/null +++ b/packages/plugin/README.md @@ -0,0 +1,37 @@ +# `@sigmacomputing/plugin` is deprecated + +> **This package has been renamed to [`@sigmacomputing/plugin-sdk`](https://www.npmjs.com/package/@sigmacomputing/plugin-sdk).** +> +> `@sigmacomputing/plugin` will no longer receive updates. Please migrate your +> projects to `@sigmacomputing/plugin-sdk` to continue receiving new features +> and bug fixes. + +This package is now a thin compatibility shim that re-exports everything from +`@sigmacomputing/plugin-sdk`. It emits a `console.warn` at import time to +remind consumers to migrate. + +## Migrating + +Replace your dependency on `@sigmacomputing/plugin` with `@sigmacomputing/plugin-sdk`: + +```sh +yarn remove @sigmacomputing/plugin +yarn add @sigmacomputing/plugin-sdk +``` + +```sh +npm uninstall @sigmacomputing/plugin +npm install @sigmacomputing/plugin-sdk +``` + +Then update your imports: + +```diff +-import { client, initialize } from '@sigmacomputing/plugin'; ++import { client, initialize } from '@sigmacomputing/plugin-sdk'; +``` + +The public API is unchanged — only the package name is different. + +For documentation, examples, and the changelog, see the +[`@sigmacomputing/plugin-sdk`](https://github.com/sigmacomputing/plugin) repository. diff --git a/packages/plugin/package.json b/packages/plugin/package.json new file mode 100644 index 0000000..6e4aa52 --- /dev/null +++ b/packages/plugin/package.json @@ -0,0 +1,52 @@ +{ + "name": "@sigmacomputing/plugin", + "version": "1.2.0", + "description": "Deprecated: use @sigmacomputing/plugin-sdk instead.", + "license": "MIT", + "type": "module", + "scripts": { + "build": "tsdown", + "build:watch": "tsdown --watch", + "format": "yarn g:format", + "lint": "yarn g:lint", + "publish": "yarn g:publlish", + "types": "yarn g:types" + }, + "dependencies": { + "@sigmacomputing/plugin-sdk": "workspace:^" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + } + }, + "devDependencies": { + "tsdown": "^0.21.10" + }, + "main": "./dist/cjs/index.cjs", + "module": "./dist/esm/index.js", + "types": "./dist/cjs/index.d.cts", + "exports": { + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/cjs/index.d.cts", + "default": "./dist/cjs/index.cjs" + } + }, + "./package.json": "./package.json" + }, + "files": [ + "dist/**/*", + "src/**/*" + ], + "publishConfig": { + "access": "public" + } +} diff --git a/packages/plugin/src/index.ts b/packages/plugin/src/index.ts new file mode 100644 index 0000000..b4e5ae0 --- /dev/null +++ b/packages/plugin/src/index.ts @@ -0,0 +1,6 @@ +console.warn( + '[@sigmacomputing/plugin] This package is deprecated and will no longer receive updates. ' + + 'Please migrate to @sigmacomputing/plugin-sdk: https://github.com/sigmacomputing/plugin', +); + +export * from '@sigmacomputing/plugin-sdk'; diff --git a/packages/plugin/tsconfig.app.json b/packages/plugin/tsconfig.app.json new file mode 100644 index 0000000..2ed40b8 --- /dev/null +++ b/packages/plugin/tsconfig.app.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.app.json", + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo" + }, + "include": ["src"] +} diff --git a/packages/plugin/tsconfig.json b/packages/plugin/tsconfig.json new file mode 100644 index 0000000..473104a --- /dev/null +++ b/packages/plugin/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.tsbuildinfo", + + "noEmit": true + }, + "files": [], + "references": [ + { "path": "./tsconfig.app.json" }, + { "path": "./tsconfig.node.json" } + ] +} diff --git a/packages/plugin/tsconfig.node.json b/packages/plugin/tsconfig.node.json new file mode 100644 index 0000000..700baa1 --- /dev/null +++ b/packages/plugin/tsconfig.node.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.node.json", + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo" + }, + "include": ["tsdown.config.ts"] +} diff --git a/packages/plugin/tsdown.config.ts b/packages/plugin/tsdown.config.ts new file mode 100644 index 0000000..0125ec6 --- /dev/null +++ b/packages/plugin/tsdown.config.ts @@ -0,0 +1,29 @@ +import { defineConfig } from 'tsdown'; + +export default defineConfig({ + clean: true, + failOnWarn: true, + logLevel: 'warn', + + dts: true, + entry: ['./src/index.ts'], + format: { + esm: { + outputOptions: { + dir: './dist/esm', + }, + }, + cjs: { + outputOptions: { + dir: './dist/cjs', + }, + }, + }, + platform: 'browser', + sourcemap: true, + tsconfig: './tsconfig.app.json', + + publint: true, + attw: true, + unused: true, +}); From 3a841d85039c5d8a059408aa55761f9fb81ed451 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 22 May 2026 00:21:23 +0000 Subject: [PATCH 2/4] Pin shim dep to an explicit version range instead of workspace:^ Replace the workspace:^ dependency on @sigmacomputing/plugin-sdk in the deprecated shim with an explicit ^X.Y.Z range, since the workspace protocol is not being rewritten to a concrete version at publish time. Update the bump-version script to keep any @sigmacomputing/* dependency in lockstep with the package version so the two stay in sync on every release bump. --- packages/plugin/package.json | 2 +- scripts/bump-version.ts | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/packages/plugin/package.json b/packages/plugin/package.json index 6e4aa52..f88278d 100644 --- a/packages/plugin/package.json +++ b/packages/plugin/package.json @@ -13,7 +13,7 @@ "types": "yarn g:types" }, "dependencies": { - "@sigmacomputing/plugin-sdk": "workspace:^" + "@sigmacomputing/plugin-sdk": "^1.2.0" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" diff --git a/scripts/bump-version.ts b/scripts/bump-version.ts index 9a115df..449e59e 100644 --- a/scripts/bump-version.ts +++ b/scripts/bump-version.ts @@ -100,13 +100,27 @@ const readCurrentVersion = (): semver.SemVer => { return parsed; }; +const WORKSPACE_DEP_SCOPE = '@sigmacomputing/'; + const writeNewVersion = (pkgPath: string, version: string): void => { const raw = readFileSync(pkgPath, 'utf8'); const pattern = /("version"\s*:\s*")[^"]+(")/; if (!pattern.test(raw)) { throw new Error(`Failed to locate "version" field in ${pkgPath}`); } - writeFileSync(pkgPath, raw.replace(pattern, `$1${version}$2`)); + const withVersion = raw.replace(pattern, `$1${version}$2`); + + const escaped = WORKSPACE_DEP_SCOPE.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + const depPattern = new RegExp( + `("${escaped}[^"]+"\\s*:\\s*")(\\^|~)?[^"]+(")`, + 'g', + ); + const withDeps = withVersion.replace( + depPattern, + (_match, prefix, range, suffix) => `${prefix}${range ?? '^'}${version}${suffix}`, + ); + + writeFileSync(pkgPath, withDeps); }; type TurboQueryLsResponse = { From c1576cc55f932e59d744ce61e3d93b5acbefe211 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 22 May 2026 00:29:47 +0000 Subject: [PATCH 3/4] Inherit base tsdown config in deprecated shim Mirror the plugin-sdk's tsdown.config.ts pattern by merging the repository's shared base config. This restores the UMD bundle (which the base config emits alongside ESM and CJS), so add unpkg and jsdelivr entries back to the shim's package.json to advertise the UMD build. --- packages/plugin/package.json | 2 ++ packages/plugin/tsdown.config.ts | 38 ++++++++++---------------------- 2 files changed, 14 insertions(+), 26 deletions(-) diff --git a/packages/plugin/package.json b/packages/plugin/package.json index f88278d..1b06fa1 100644 --- a/packages/plugin/package.json +++ b/packages/plugin/package.json @@ -29,6 +29,8 @@ "main": "./dist/cjs/index.cjs", "module": "./dist/esm/index.js", "types": "./dist/cjs/index.d.cts", + "unpkg": "./dist/umd/sigmacomputing-plugin.umd.js", + "jsdelivr": "./dist/umd/sigmacomputing-plugin.umd.js", "exports": { ".": { "import": { diff --git a/packages/plugin/tsdown.config.ts b/packages/plugin/tsdown.config.ts index 0125ec6..fdb5930 100644 --- a/packages/plugin/tsdown.config.ts +++ b/packages/plugin/tsdown.config.ts @@ -1,29 +1,15 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig, mergeConfig } from 'tsdown'; -export default defineConfig({ - clean: true, - failOnWarn: true, - logLevel: 'warn', +// @ts-ignore - base config is defined outside of this package +import baseConfig from '../../tsdown.base.ts'; - dts: true, - entry: ['./src/index.ts'], - format: { - esm: { - outputOptions: { - dir: './dist/esm', - }, - }, - cjs: { - outputOptions: { - dir: './dist/cjs', - }, - }, - }, - platform: 'browser', - sourcemap: true, - tsconfig: './tsconfig.app.json', +import packageJson from './package.json' with { type: 'json' }; - publint: true, - attw: true, - unused: true, -}); +export default mergeConfig( + baseConfig, + defineConfig({ + define: { + __VERSION__: JSON.stringify(packageJson.version), + }, + }), +); From 666808731582d493ac745f9fe20f0e9a7d4d8053 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 22 May 2026 00:40:29 +0000 Subject: [PATCH 4/4] Move __VERSION__ injection into the base configs bump-version.ts keeps every workspace package's version in lockstep with the root, so the per-package __VERSION__ overrides duplicated the root value. Inject __VERSION__ from the root package.json in tsdown.base.ts (already there) and vitest.base.ts (added), and collapse each package's tsdown.config.ts and vitest.config.ts into thin pass-throughs of the base. --- packages/plugin-sdk/tsdown.config.ts | 15 +-------------- packages/plugin-sdk/vitest.config.ts | 15 +-------------- packages/plugin/tsdown.config.ts | 15 +-------------- vitest.base.ts | 3 +++ 4 files changed, 6 insertions(+), 42 deletions(-) diff --git a/packages/plugin-sdk/tsdown.config.ts b/packages/plugin-sdk/tsdown.config.ts index fdb5930..b14ad3f 100644 --- a/packages/plugin-sdk/tsdown.config.ts +++ b/packages/plugin-sdk/tsdown.config.ts @@ -1,15 +1,2 @@ -import { defineConfig, mergeConfig } from 'tsdown'; - // @ts-ignore - base config is defined outside of this package -import baseConfig from '../../tsdown.base.ts'; - -import packageJson from './package.json' with { type: 'json' }; - -export default mergeConfig( - baseConfig, - defineConfig({ - define: { - __VERSION__: JSON.stringify(packageJson.version), - }, - }), -); +export { default } from '../../tsdown.base.ts'; diff --git a/packages/plugin-sdk/vitest.config.ts b/packages/plugin-sdk/vitest.config.ts index c3e1107..150a68b 100644 --- a/packages/plugin-sdk/vitest.config.ts +++ b/packages/plugin-sdk/vitest.config.ts @@ -1,15 +1,2 @@ -import { defineConfig, mergeConfig } from 'vitest/config'; - // @ts-ignore - base config is defined outside of this package -import baseConfig from '../../vitest.base.ts'; - -import packageJson from './package.json' with { type: 'json' }; - -export default mergeConfig( - baseConfig, - defineConfig({ - define: { - __VERSION__: JSON.stringify(packageJson.version), - }, - }), -); +export { default } from '../../vitest.base.ts'; diff --git a/packages/plugin/tsdown.config.ts b/packages/plugin/tsdown.config.ts index fdb5930..b14ad3f 100644 --- a/packages/plugin/tsdown.config.ts +++ b/packages/plugin/tsdown.config.ts @@ -1,15 +1,2 @@ -import { defineConfig, mergeConfig } from 'tsdown'; - // @ts-ignore - base config is defined outside of this package -import baseConfig from '../../tsdown.base.ts'; - -import packageJson from './package.json' with { type: 'json' }; - -export default mergeConfig( - baseConfig, - defineConfig({ - define: { - __VERSION__: JSON.stringify(packageJson.version), - }, - }), -); +export { default } from '../../tsdown.base.ts'; diff --git a/vitest.base.ts b/vitest.base.ts index d84730c..a3de5fd 100644 --- a/vitest.base.ts +++ b/vitest.base.ts @@ -1,8 +1,11 @@ import { playwright } from '@vitest/browser-playwright'; import { defineConfig } from 'vitest/config'; +import packageJson from './package.json' with { type: 'json' }; + export default defineConfig({ define: { + __VERSION__: JSON.stringify(packageJson.version), __VITEST_BROWSER__: true.toString(), }, oxc: {