From 8e2356b2d17ea7abe1475a359bf032cb5d8b421c Mon Sep 17 00:00:00 2001 From: Joshua Wink Date: Sat, 10 Oct 2026 15:58:38 -0500 Subject: [PATCH 1/3] build(typescript): the three packages can go to npm, as a beta - The packages are no longer private. Each one publishes with the npm tag "beta", so a person gets it with npm install codeupipe@beta. - The three packages are one npm workspace, with one lock file at the root of the repository. codeupipe-lint and codeupipe-compile need the exact version of codeupipe, where they had a link to its directory. - The built core package has no rule for the Node version: its JavaScript runs in a browser and in older Node. The two tools need Node 20. - CI has one job for the TypeScript packages, and it also makes the packages as npm does. Nothing is published by this change. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 70 ++-------------- .gitignore | 1 + README.md | 15 ++-- conformance/run.py | 7 +- .../package-lock.json => package-lock.json | 79 +++++++++++++++---- package.json | 15 ++++ packages/codeupipe-compile-ts/README.md | 9 ++- .../codeupipe-compile-ts/package-lock.json | 73 ----------------- packages/codeupipe-compile-ts/package.json | 27 +++++-- packages/codeupipe-lint-ts/README.md | 20 +++-- packages/codeupipe-lint-ts/package-lock.json | 73 ----------------- packages/codeupipe-lint-ts/package.json | 27 +++++-- packages/codeupipe-ts/README.md | 16 +++- packages/codeupipe-ts/package.json | 19 +++-- 14 files changed, 188 insertions(+), 263 deletions(-) rename packages/codeupipe-ts/package-lock.json => package-lock.json (91%) create mode 100644 package.json delete mode 100644 packages/codeupipe-compile-ts/package-lock.json delete mode 100644 packages/codeupipe-lint-ts/package-lock.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a722404..a4fa748 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,11 +39,8 @@ jobs: run: python conformance/run.py typescript: - name: TypeScript runtime + name: TypeScript packages runs-on: ubuntu-latest - defaults: - run: - working-directory: packages/codeupipe-ts steps: - uses: actions/checkout@v5 - uses: actions/setup-python@v6 @@ -54,73 +51,20 @@ jobs: node-version: "24" - name: Install run: npm ci - - name: Type check - run: npm run typecheck - - name: Tests - run: npm test - name: Build run: npm run build - - name: Example - run: node examples/pricing/main.ts - - name: Conformance - working-directory: . - run: python conformance/run.py typescript:run - - typescript-lint: - name: TypeScript linter - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - uses: actions/setup-node@v5 - with: - node-version: "24" - - name: Install the core package - working-directory: packages/codeupipe-ts - run: npm ci - - name: Install - working-directory: packages/codeupipe-lint-ts - run: npm ci - name: Type check - working-directory: packages/codeupipe-lint-ts run: npm run typecheck - name: Tests - working-directory: packages/codeupipe-lint-ts run: npm test - - name: Build - working-directory: packages/codeupipe-lint-ts - run: npm run build + - name: Example + run: node packages/codeupipe-ts/examples/pricing/main.ts - name: The linter on the TypeScript code of this repository - working-directory: packages/codeupipe-lint-ts - run: npm run lint - - typescript-compile: - name: TypeScript compiler - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - uses: actions/setup-python@v6 - with: - python-version: "3.12" - - uses: actions/setup-node@v5 - with: - node-version: "24" - - name: Install the core package - working-directory: packages/codeupipe-ts - run: npm ci - - name: Install - working-directory: packages/codeupipe-compile-ts - run: npm ci - - name: Type check - working-directory: packages/codeupipe-compile-ts - run: npm run typecheck - - name: Tests - working-directory: packages/codeupipe-compile-ts - run: npm test - - name: Build - working-directory: packages/codeupipe-compile-ts - run: npm run build + run: npm run lint -w codeupipe-lint - name: Conformance - run: python conformance/run.py typescript:static + run: python conformance/run.py typescript:run typescript:static + - name: The packages as npm makes them + run: npm pack --workspaces --dry-run export: name: Export against dynamic run diff --git a/.gitignore b/.gitignore index f839347..9fe902d 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ packages/*/build/ conformance/results/ .venv-*/ scorecard/results/ +node_modules/ diff --git a/README.md b/README.md index a3952c5..ef07606 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ # codeupipe codeupipe is a library for writing a program as a pipeline of small steps. -It is for Python. A TypeScript runtime is in this repository and is not on -npm yet. +It is for Python and for TypeScript. There are eight primitives. Each one does one thing. @@ -81,8 +80,12 @@ These changes are not compatible with 1.0.0. - **`codeupipe.lower` is now `codeupipe.compile`.** The command is `python -m codeupipe.compile`. -The TypeScript packages are new. They are version `1.0.0-beta.1` and are not on -npm. +The TypeScript packages are new. They are version `1.0.0-beta.1`: + +```bash +npm install codeupipe@beta +npm install --save-dev codeupipe-lint@beta codeupipe-compile@beta +``` ## Example @@ -203,7 +206,9 @@ An editable install needs pip 21.3 or later. | `scorecard/` | The comparison of the compiled code with the dynamic run on random pipelines | | `docs/` | Reference for the compiler and the config file | -The root `pyproject.toml` is not a package. It holds the test settings. +The root `pyproject.toml` is not a package. It holds the test settings. The +root `package.json` is not a package: it makes the three TypeScript packages +one npm workspace. ## Other languages diff --git a/conformance/run.py b/conformance/run.py index 59da284..0cb333a 100644 --- a/conformance/run.py +++ b/conformance/run.py @@ -74,10 +74,11 @@ def _node_runs_typescript(): "typescript:static": _typescript("static"), } -# The static target runs the compile package, which must be installed, and -# that package uses the built core package. +# The static target runs the compile package. Its dependencies must be +# installed (npm ci at the repository root), and it uses the built core +# package. _TYPESCRIPT_NEEDS = { - "typescript:static": [REPO / "packages/codeupipe-compile-ts/node_modules", + "typescript:static": [REPO / "node_modules/typescript", REPO / "packages/codeupipe-ts/dist/index.js"], } diff --git a/packages/codeupipe-ts/package-lock.json b/package-lock.json similarity index 91% rename from packages/codeupipe-ts/package-lock.json rename to package-lock.json index d3fc45f..f45b4f6 100644 --- a/packages/codeupipe-ts/package-lock.json +++ b/package-lock.json @@ -1,21 +1,15 @@ { - "name": "codeupipe", - "version": "1.0.0-beta.1", + "name": "codeupipe-repository", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "codeupipe", - "version": "1.0.0-beta.1", - "license": "Apache-2.0", - "devDependencies": { - "@types/node": "^24.0.0", - "esbuild": "^0.28.2", - "typescript": "^5.9.0" - }, - "engines": { - "node": ">=22.18" - } + "name": "codeupipe-repository", + "workspaces": [ + "packages/codeupipe-ts", + "packages/codeupipe-lint-ts", + "packages/codeupipe-compile-ts" + ] }, "node_modules/@esbuild/aix-ppc64": { "version": "0.28.2", @@ -469,6 +463,18 @@ "undici-types": ">=7.24.0 <7.24.7" } }, + "node_modules/codeupipe": { + "resolved": "packages/codeupipe-ts", + "link": true + }, + "node_modules/codeupipe-compile": { + "resolved": "packages/codeupipe-compile-ts", + "link": true + }, + "node_modules/codeupipe-lint": { + "resolved": "packages/codeupipe-lint-ts", + "link": true + }, "node_modules/esbuild": { "version": "0.28.2", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz", @@ -515,7 +521,6 @@ "version": "5.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "dev": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -531,6 +536,52 @@ "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==", "dev": true, "license": "MIT" + }, + "packages/codeupipe-compile-ts": { + "name": "codeupipe-compile", + "version": "1.0.0-beta.1", + "license": "Apache-2.0", + "dependencies": { + "codeupipe": "1.0.0-beta.1", + "typescript": "^5.9.0" + }, + "bin": { + "codeupipe-compile": "dist/cli.js" + }, + "devDependencies": { + "@types/node": "^24.0.0" + }, + "engines": { + "node": ">=20" + } + }, + "packages/codeupipe-lint-ts": { + "name": "codeupipe-lint", + "version": "1.0.0-beta.1", + "license": "Apache-2.0", + "dependencies": { + "codeupipe": "1.0.0-beta.1", + "typescript": "^5.9.0" + }, + "bin": { + "codeupipe-lint": "dist/cli.js" + }, + "devDependencies": { + "@types/node": "^24.0.0" + }, + "engines": { + "node": ">=20" + } + }, + "packages/codeupipe-ts": { + "name": "codeupipe", + "version": "1.0.0-beta.1", + "license": "Apache-2.0", + "devDependencies": { + "@types/node": "^24.0.0", + "esbuild": "^0.28.2", + "typescript": "^5.9.0" + } } } } diff --git a/package.json b/package.json new file mode 100644 index 0000000..a9ebf4f --- /dev/null +++ b/package.json @@ -0,0 +1,15 @@ +{ + "name": "codeupipe-repository", + "private": true, + "description": "The npm workspace of the TypeScript packages. It is not a package.", + "workspaces": [ + "packages/codeupipe-ts", + "packages/codeupipe-lint-ts", + "packages/codeupipe-compile-ts" + ], + "scripts": { + "build": "npm run build --workspaces", + "test": "npm test --workspaces", + "typecheck": "npm run typecheck --workspaces" + } +} diff --git a/packages/codeupipe-compile-ts/README.md b/packages/codeupipe-compile-ts/README.md index 2357435..b4320fb 100644 --- a/packages/codeupipe-compile-ts/README.md +++ b/packages/codeupipe-compile-ts/README.md @@ -1,7 +1,7 @@ # codeupipe-compile for TypeScript Writes a codeupipe pipeline as one plain TypeScript module with no import -of codeupipe. It reads the source and does not run it. It is a beta, version `1.0.0-beta.1`, and it is not on npm yet. +of codeupipe. It reads the source and does not run it. It is a beta. **The rule: code that compiles gives the same output as the pipeline. A pipeline for which the compiler cannot keep that rule is refused, with the @@ -14,7 +14,8 @@ The compiler is a codeupipe pipeline: write code. ```bash -codeupipe-compile src/pricing-pipeline.ts:PricingPipeline --out build/pricing.ts +npm install --save-dev codeupipe-compile@beta +npx codeupipe-compile src/pricing-pipeline.ts:PricingPipeline --out build/pricing.ts ``` Exit code: **0** the module is written, **1** the pipeline is refused (the @@ -107,8 +108,10 @@ compiler has neither. ## Development +The three TypeScript packages are one npm workspace. Run `npm ci` once, at +the root of the repository. Then, in this directory: + ```bash -npm install # links ../codeupipe-ts and installs the TypeScript compiler npm test # builds the core package first, then runs the tests npm run typecheck # also checks the conformance runner npm run build # JavaScript and type files in dist/ diff --git a/packages/codeupipe-compile-ts/package-lock.json b/packages/codeupipe-compile-ts/package-lock.json deleted file mode 100644 index fbf2527..0000000 --- a/packages/codeupipe-compile-ts/package-lock.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "codeupipe-compile", - "version": "1.0.0-beta.1", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "codeupipe-compile", - "version": "1.0.0-beta.1", - "license": "Apache-2.0", - "dependencies": { - "codeupipe": "file:../codeupipe-ts", - "typescript": "^5.9.0" - }, - "bin": { - "codeupipe-compile": "dist/cli.js" - }, - "devDependencies": { - "@types/node": "^24.0.0" - }, - "engines": { - "node": ">=22.18" - } - }, - "../codeupipe-ts": { - "name": "codeupipe", - "version": "1.0.0-beta.1", - "license": "Apache-2.0", - "devDependencies": { - "@types/node": "^24.0.0", - "esbuild": "^0.28.2", - "typescript": "^5.9.0" - }, - "engines": { - "node": ">=22.18" - } - }, - "node_modules/@types/node": { - "version": "24.19.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.19.2.tgz", - "integrity": "sha512-93d49wCWJkCyN87MxLpNN6KXPCwFw7bVUg79mGUV1OS40JGWwVCr8n61DXCSqz7CV6/VfPkb7xec7uP2M+QHWQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": ">=7.24.0 <7.24.7" - } - }, - "node_modules/codeupipe": { - "resolved": "../codeupipe-ts", - "link": true - }, - "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/undici-types": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz", - "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==", - "dev": true, - "license": "MIT" - } - } -} diff --git a/packages/codeupipe-compile-ts/package.json b/packages/codeupipe-compile-ts/package.json index cfee3fc..dd143fb 100644 --- a/packages/codeupipe-compile-ts/package.json +++ b/packages/codeupipe-compile-ts/package.json @@ -1,7 +1,6 @@ { "name": "codeupipe-compile", "version": "1.0.0-beta.1", - "private": true, "description": "Writes a codeupipe pipeline as plain TypeScript with no import of codeupipe.", "license": "Apache-2.0", "repository": { @@ -15,9 +14,18 @@ "bin": { "codeupipe-compile": "./dist/cli.js" }, - "files": ["dist", "LICENSE", "NOTICE", "README.md"], + "files": [ + "dist", + "LICENSE", + "NOTICE", + "README.md" + ], + "publishConfig": { + "access": "public", + "tag": "beta" + }, "engines": { - "node": ">=22.18" + "node": ">=20" }, "scripts": { "core": "npm --prefix ../codeupipe-ts run build", @@ -26,13 +34,20 @@ "pretypecheck": "npm run core", "typecheck": "tsc --noEmit", "prebuild": "npm run core", - "build": "tsc -p tsconfig.build.json" + "build": "tsc -p tsconfig.build.json", + "prepack": "npm run build" }, "dependencies": { - "codeupipe": "file:../codeupipe-ts", + "codeupipe": "1.0.0-beta.1", "typescript": "^5.9.0" }, "devDependencies": { "@types/node": "^24.0.0" - } + }, + "keywords": [ + "pipeline", + "filter", + "payload", + "composition" + ] } diff --git a/packages/codeupipe-lint-ts/README.md b/packages/codeupipe-lint-ts/README.md index 5f4668b..6c50aaa 100644 --- a/packages/codeupipe-lint-ts/README.md +++ b/packages/codeupipe-lint-ts/README.md @@ -1,18 +1,22 @@ # codeupipe-lint for TypeScript A linter for TypeScript code that uses codeupipe. It reads the source and -does not run it. It is a beta, version `1.0.0-beta.1`, and it is not on npm yet. +does not run it. It is a beta. The linter is a codeupipe pipeline: [src/lint-pipeline.ts](src/lint-pipeline.ts). It depends on `codeupipe` and on the `typescript` package, which it uses to parse the files. ```bash -codeupipe-lint src # files or directories -codeupipe-lint --exclude '*/generated/*' src -codeupipe-lint --disable CUP-I005 src -codeupipe-lint --rules # list the rule ids -codeupipe-lint # paths come from cup.config.json +npm install --save-dev codeupipe-lint@beta +``` + +```bash +npx codeupipe-lint src # files or directories +npx codeupipe-lint --exclude '*/generated/*' src +npx codeupipe-lint --disable CUP-I005 src +npx codeupipe-lint --rules # list the rule ids +npx codeupipe-lint # paths come from cup.config.json ``` Each finding is one line, and the message names the fix: @@ -95,8 +99,10 @@ The file is used only when no paths are given on the command line. A key in ## Development +The three TypeScript packages are one npm workspace. Run `npm ci` once, at +the root of the repository. Then, in this directory: + ```bash -npm install # links ../codeupipe-ts and installs the TypeScript compiler npm test # builds the core package first, then runs the tests npm run typecheck npm run build # JavaScript and type files in dist/ diff --git a/packages/codeupipe-lint-ts/package-lock.json b/packages/codeupipe-lint-ts/package-lock.json deleted file mode 100644 index c00e595..0000000 --- a/packages/codeupipe-lint-ts/package-lock.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "codeupipe-lint", - "version": "1.0.0-beta.1", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "codeupipe-lint", - "version": "1.0.0-beta.1", - "license": "Apache-2.0", - "dependencies": { - "codeupipe": "file:../codeupipe-ts", - "typescript": "^5.9.0" - }, - "bin": { - "codeupipe-lint": "dist/cli.js" - }, - "devDependencies": { - "@types/node": "^24.0.0" - }, - "engines": { - "node": ">=22.18" - } - }, - "../codeupipe-ts": { - "name": "codeupipe", - "version": "1.0.0-beta.1", - "license": "Apache-2.0", - "devDependencies": { - "@types/node": "^24.0.0", - "esbuild": "^0.28.2", - "typescript": "^5.9.0" - }, - "engines": { - "node": ">=22.18" - } - }, - "node_modules/@types/node": { - "version": "24.19.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.19.2.tgz", - "integrity": "sha512-93d49wCWJkCyN87MxLpNN6KXPCwFw7bVUg79mGUV1OS40JGWwVCr8n61DXCSqz7CV6/VfPkb7xec7uP2M+QHWQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": ">=7.24.0 <7.24.7" - } - }, - "node_modules/codeupipe": { - "resolved": "../codeupipe-ts", - "link": true - }, - "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/undici-types": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz", - "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==", - "dev": true, - "license": "MIT" - } - } -} diff --git a/packages/codeupipe-lint-ts/package.json b/packages/codeupipe-lint-ts/package.json index 6d5f607..c4bcae2 100644 --- a/packages/codeupipe-lint-ts/package.json +++ b/packages/codeupipe-lint-ts/package.json @@ -1,7 +1,6 @@ { "name": "codeupipe-lint", "version": "1.0.0-beta.1", - "private": true, "description": "A linter for TypeScript code that uses codeupipe.", "license": "Apache-2.0", "repository": { @@ -15,9 +14,18 @@ "bin": { "codeupipe-lint": "./dist/cli.js" }, - "files": ["dist", "LICENSE", "NOTICE", "README.md"], + "files": [ + "dist", + "LICENSE", + "NOTICE", + "README.md" + ], + "publishConfig": { + "access": "public", + "tag": "beta" + }, "engines": { - "node": ">=22.18" + "node": ">=20" }, "scripts": { "core": "npm --prefix ../codeupipe-ts run build", @@ -27,13 +35,20 @@ "typecheck": "tsc --noEmit", "prebuild": "npm run core", "build": "tsc -p tsconfig.build.json", - "lint": "node src/cli.ts src ../codeupipe-ts/src ../codeupipe-ts/examples ../codeupipe-compile-ts/src ../../conformance/runners/typescript" + "lint": "node src/cli.ts src ../codeupipe-ts/src ../codeupipe-ts/examples ../codeupipe-compile-ts/src ../../conformance/runners/typescript", + "prepack": "npm run build" }, "dependencies": { - "codeupipe": "file:../codeupipe-ts", + "codeupipe": "1.0.0-beta.1", "typescript": "^5.9.0" }, "devDependencies": { "@types/node": "^24.0.0" - } + }, + "keywords": [ + "pipeline", + "filter", + "payload", + "composition" + ] } diff --git a/packages/codeupipe-ts/README.md b/packages/codeupipe-ts/README.md index 813425e..d8574a3 100644 --- a/packages/codeupipe-ts/README.md +++ b/packages/codeupipe-ts/README.md @@ -4,10 +4,17 @@ codeupipe is a library for writing a program as a pipeline of small steps. This is the TypeScript runtime. It has no dependencies. The built JavaScript runs in a browser and in Node. -It is a beta, version `1.0.0-beta.1`, and it is not on npm yet. It implements the same contract as the Python +It is a beta. It implements the same contract as the Python package, and the same 27 conformance cases judge it: [conformance/API.md](../../conformance/API.md). +```bash +npm install codeupipe@beta +``` + +A beta can change in a way that is not compatible, from one beta to the +next. + ## The eight primitives | Primitive | What it does | Who writes it | @@ -92,8 +99,7 @@ result.toDict(); // { price: 90, qty: 12, bulk: true } ``` -In this repository the example imports from `../../src/index.ts`, because -the package is not installed. +In this repository the example imports from `../../src/index.ts`. ## Names @@ -143,8 +149,10 @@ that keeps names, and the labels change only in the second. Node 22.18 or later runs the `.ts` files as they are. +The three TypeScript packages are one npm workspace. Run `npm ci` once, at +the root of the repository. Then, in this directory: + ```bash -npm install # the TypeScript compiler, the Node types and esbuild, for development only npm test # the tests npm run typecheck # the type check of the source, tests and example npm run build # JavaScript and type files in dist/ diff --git a/packages/codeupipe-ts/package.json b/packages/codeupipe-ts/package.json index 102dfe4..0330b17 100644 --- a/packages/codeupipe-ts/package.json +++ b/packages/codeupipe-ts/package.json @@ -1,7 +1,6 @@ { "name": "codeupipe", "version": "1.0.0-beta.1", - "private": true, "description": "A TypeScript library for writing a program as a pipeline of small steps.", "license": "Apache-2.0", "repository": { @@ -24,18 +23,26 @@ "NOTICE", "README.md" ], - "sideEffects": false, - "engines": { - "node": ">=22.18" + "publishConfig": { + "access": "public", + "tag": "beta" }, + "sideEffects": false, "scripts": { "test": "node --test \"tests/*.test.ts\"", "typecheck": "tsc --noEmit", - "build": "tsc -p tsconfig.build.json" + "build": "tsc -p tsconfig.build.json", + "prepack": "npm run build" }, "devDependencies": { "@types/node": "^24.0.0", "esbuild": "^0.28.2", "typescript": "^5.9.0" - } + }, + "keywords": [ + "pipeline", + "filter", + "payload", + "composition" + ] } From da8ff23ecd2fd5432a61bb692bfe64a58e2d068c Mon Sep 17 00:00:00 2001 From: Joshua Wink Date: Sat, 10 Oct 2026 16:10:20 -0500 Subject: [PATCH 2/3] build(typescript): the packages are version 0.1.0 A version below 1.0 says that the packages are not stable yet. They publish with the normal npm tag, so npm install codeupipe gives them. Co-Authored-By: Claude Opus 5.5 --- README.md | 8 +++++--- package-lock.json | 10 +++++----- packages/codeupipe-compile-ts/README.md | 4 ++-- packages/codeupipe-compile-ts/package.json | 7 +++---- packages/codeupipe-lint-ts/README.md | 7 +++++-- packages/codeupipe-lint-ts/package.json | 7 +++---- packages/codeupipe-ts/README.md | 8 ++++---- packages/codeupipe-ts/package.json | 5 ++--- 8 files changed, 29 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index ef07606..fece816 100644 --- a/README.md +++ b/README.md @@ -80,11 +80,13 @@ These changes are not compatible with 1.0.0. - **`codeupipe.lower` is now `codeupipe.compile`.** The command is `python -m codeupipe.compile`. -The TypeScript packages are new. They are version `1.0.0-beta.1`: +The TypeScript packages are new. They are version `0.1.0`. A version below +1.0 is not stable yet, and a new version can change in a way that is not +compatible. ```bash -npm install codeupipe@beta -npm install --save-dev codeupipe-lint@beta codeupipe-compile@beta +npm install codeupipe +npm install --save-dev codeupipe-lint codeupipe-compile ``` ## Example diff --git a/package-lock.json b/package-lock.json index f45b4f6..727adf1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -539,10 +539,10 @@ }, "packages/codeupipe-compile-ts": { "name": "codeupipe-compile", - "version": "1.0.0-beta.1", + "version": "0.1.0", "license": "Apache-2.0", "dependencies": { - "codeupipe": "1.0.0-beta.1", + "codeupipe": "0.1.0", "typescript": "^5.9.0" }, "bin": { @@ -557,10 +557,10 @@ }, "packages/codeupipe-lint-ts": { "name": "codeupipe-lint", - "version": "1.0.0-beta.1", + "version": "0.1.0", "license": "Apache-2.0", "dependencies": { - "codeupipe": "1.0.0-beta.1", + "codeupipe": "0.1.0", "typescript": "^5.9.0" }, "bin": { @@ -575,7 +575,7 @@ }, "packages/codeupipe-ts": { "name": "codeupipe", - "version": "1.0.0-beta.1", + "version": "0.1.0", "license": "Apache-2.0", "devDependencies": { "@types/node": "^24.0.0", diff --git a/packages/codeupipe-compile-ts/README.md b/packages/codeupipe-compile-ts/README.md index b4320fb..d1124cb 100644 --- a/packages/codeupipe-compile-ts/README.md +++ b/packages/codeupipe-compile-ts/README.md @@ -1,7 +1,7 @@ # codeupipe-compile for TypeScript Writes a codeupipe pipeline as one plain TypeScript module with no import -of codeupipe. It reads the source and does not run it. It is a beta. +of codeupipe. It reads the source and does not run it. **The rule: code that compiles gives the same output as the pipeline. A pipeline for which the compiler cannot keep that rule is refused, with the @@ -14,7 +14,7 @@ The compiler is a codeupipe pipeline: write code. ```bash -npm install --save-dev codeupipe-compile@beta +npm install --save-dev codeupipe-compile npx codeupipe-compile src/pricing-pipeline.ts:PricingPipeline --out build/pricing.ts ``` diff --git a/packages/codeupipe-compile-ts/package.json b/packages/codeupipe-compile-ts/package.json index dd143fb..623d8ba 100644 --- a/packages/codeupipe-compile-ts/package.json +++ b/packages/codeupipe-compile-ts/package.json @@ -1,6 +1,6 @@ { "name": "codeupipe-compile", - "version": "1.0.0-beta.1", + "version": "0.1.0", "description": "Writes a codeupipe pipeline as plain TypeScript with no import of codeupipe.", "license": "Apache-2.0", "repository": { @@ -21,8 +21,7 @@ "README.md" ], "publishConfig": { - "access": "public", - "tag": "beta" + "access": "public" }, "engines": { "node": ">=20" @@ -38,7 +37,7 @@ "prepack": "npm run build" }, "dependencies": { - "codeupipe": "1.0.0-beta.1", + "codeupipe": "0.1.0", "typescript": "^5.9.0" }, "devDependencies": { diff --git a/packages/codeupipe-lint-ts/README.md b/packages/codeupipe-lint-ts/README.md index 6c50aaa..d29ecf2 100644 --- a/packages/codeupipe-lint-ts/README.md +++ b/packages/codeupipe-lint-ts/README.md @@ -1,16 +1,19 @@ # codeupipe-lint for TypeScript A linter for TypeScript code that uses codeupipe. It reads the source and -does not run it. It is a beta. +does not run it. The linter is a codeupipe pipeline: [src/lint-pipeline.ts](src/lint-pipeline.ts). It depends on `codeupipe` and on the `typescript` package, which it uses to parse the files. ```bash -npm install --save-dev codeupipe-lint@beta +npm install --save-dev codeupipe-lint ``` +The version is below 1.0: the package is not stable yet, and a new version +can change in a way that is not compatible. + ```bash npx codeupipe-lint src # files or directories npx codeupipe-lint --exclude '*/generated/*' src diff --git a/packages/codeupipe-lint-ts/package.json b/packages/codeupipe-lint-ts/package.json index c4bcae2..ab8cb88 100644 --- a/packages/codeupipe-lint-ts/package.json +++ b/packages/codeupipe-lint-ts/package.json @@ -1,6 +1,6 @@ { "name": "codeupipe-lint", - "version": "1.0.0-beta.1", + "version": "0.1.0", "description": "A linter for TypeScript code that uses codeupipe.", "license": "Apache-2.0", "repository": { @@ -21,8 +21,7 @@ "README.md" ], "publishConfig": { - "access": "public", - "tag": "beta" + "access": "public" }, "engines": { "node": ">=20" @@ -39,7 +38,7 @@ "prepack": "npm run build" }, "dependencies": { - "codeupipe": "1.0.0-beta.1", + "codeupipe": "0.1.0", "typescript": "^5.9.0" }, "devDependencies": { diff --git a/packages/codeupipe-ts/README.md b/packages/codeupipe-ts/README.md index d8574a3..a944fae 100644 --- a/packages/codeupipe-ts/README.md +++ b/packages/codeupipe-ts/README.md @@ -4,16 +4,16 @@ codeupipe is a library for writing a program as a pipeline of small steps. This is the TypeScript runtime. It has no dependencies. The built JavaScript runs in a browser and in Node. -It is a beta. It implements the same contract as the Python +It implements the same contract as the Python package, and the same 27 conformance cases judge it: [conformance/API.md](../../conformance/API.md). ```bash -npm install codeupipe@beta +npm install codeupipe ``` -A beta can change in a way that is not compatible, from one beta to the -next. +The version is below 1.0: the package is not stable yet, and a new version +can change in a way that is not compatible. ## The eight primitives diff --git a/packages/codeupipe-ts/package.json b/packages/codeupipe-ts/package.json index 0330b17..dce99da 100644 --- a/packages/codeupipe-ts/package.json +++ b/packages/codeupipe-ts/package.json @@ -1,6 +1,6 @@ { "name": "codeupipe", - "version": "1.0.0-beta.1", + "version": "0.1.0", "description": "A TypeScript library for writing a program as a pipeline of small steps.", "license": "Apache-2.0", "repository": { @@ -24,8 +24,7 @@ "README.md" ], "publishConfig": { - "access": "public", - "tag": "beta" + "access": "public" }, "sideEffects": false, "scripts": { From a2b3d4067b1611384bf434c57c60f5fb3a111a33 Mon Sep 17 00:00:00 2001 From: Joshua Wink Date: Sat, 10 Oct 2026 16:12:41 -0500 Subject: [PATCH 3/3] build(typescript): the packages stay off npm for now The packages are private again, so that a publish cannot happen by accident. The README says how to make them from this repository and install the files that npm pack writes. Co-Authored-By: Claude Opus 5.5 --- README.md | 9 +++------ packages/codeupipe-compile-ts/README.md | 4 +++- packages/codeupipe-compile-ts/package.json | 1 + packages/codeupipe-lint-ts/README.md | 8 +++----- packages/codeupipe-lint-ts/package.json | 1 + packages/codeupipe-ts/README.md | 20 +++++++++++++++++--- packages/codeupipe-ts/package.json | 1 + 7 files changed, 29 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index fece816..146e1fb 100644 --- a/README.md +++ b/README.md @@ -82,12 +82,9 @@ These changes are not compatible with 1.0.0. The TypeScript packages are new. They are version `0.1.0`. A version below 1.0 is not stable yet, and a new version can change in a way that is not -compatible. - -```bash -npm install codeupipe -npm install --save-dev codeupipe-lint codeupipe-compile -``` +compatible. They are not on npm yet: +[packages/codeupipe-ts/README.md](packages/codeupipe-ts/README.md) says how to +install them from this repository. ## Example diff --git a/packages/codeupipe-compile-ts/README.md b/packages/codeupipe-compile-ts/README.md index d1124cb..ed4c08b 100644 --- a/packages/codeupipe-compile-ts/README.md +++ b/packages/codeupipe-compile-ts/README.md @@ -13,8 +13,10 @@ The compiler is a codeupipe pipeline: `codeupipe` and on the `typescript` package, which it uses to read and write code. +It is not on npm yet: the [README of the core package](../codeupipe-ts/README.md) +says how to install it from this repository. + ```bash -npm install --save-dev codeupipe-compile npx codeupipe-compile src/pricing-pipeline.ts:PricingPipeline --out build/pricing.ts ``` diff --git a/packages/codeupipe-compile-ts/package.json b/packages/codeupipe-compile-ts/package.json index 623d8ba..53810e8 100644 --- a/packages/codeupipe-compile-ts/package.json +++ b/packages/codeupipe-compile-ts/package.json @@ -1,6 +1,7 @@ { "name": "codeupipe-compile", "version": "0.1.0", + "private": true, "description": "Writes a codeupipe pipeline as plain TypeScript with no import of codeupipe.", "license": "Apache-2.0", "repository": { diff --git a/packages/codeupipe-lint-ts/README.md b/packages/codeupipe-lint-ts/README.md index d29ecf2..4573218 100644 --- a/packages/codeupipe-lint-ts/README.md +++ b/packages/codeupipe-lint-ts/README.md @@ -7,12 +7,10 @@ The linter is a codeupipe pipeline: [src/lint-pipeline.ts](src/lint-pipeline.ts) It depends on `codeupipe` and on the `typescript` package, which it uses to parse the files. -```bash -npm install --save-dev codeupipe-lint -``` - The version is below 1.0: the package is not stable yet, and a new version -can change in a way that is not compatible. +can change in a way that is not compatible. It is not on npm yet: the +[README of the core package](../codeupipe-ts/README.md) says how to install it +from this repository. ```bash npx codeupipe-lint src # files or directories diff --git a/packages/codeupipe-lint-ts/package.json b/packages/codeupipe-lint-ts/package.json index ab8cb88..eeb7cee 100644 --- a/packages/codeupipe-lint-ts/package.json +++ b/packages/codeupipe-lint-ts/package.json @@ -1,6 +1,7 @@ { "name": "codeupipe-lint", "version": "0.1.0", + "private": true, "description": "A linter for TypeScript code that uses codeupipe.", "license": "Apache-2.0", "repository": { diff --git a/packages/codeupipe-ts/README.md b/packages/codeupipe-ts/README.md index a944fae..90ade7a 100644 --- a/packages/codeupipe-ts/README.md +++ b/packages/codeupipe-ts/README.md @@ -8,12 +8,26 @@ It implements the same contract as the Python package, and the same 27 conformance cases judge it: [conformance/API.md](../../conformance/API.md). +The version is below 1.0: the package is not stable yet, and a new version +can change in a way that is not compatible. + +The packages are not on npm yet. Make them from this repository, and +install the files that `npm pack` writes: + ```bash -npm install codeupipe +git clone https://github.com/orchestrate-solutions/codeupipe +cd codeupipe && npm ci +npm pack --workspaces --pack-destination /tmp/codeupipe ``` -The version is below 1.0: the package is not stable yet, and a new version -can change in a way that is not compatible. +```bash +# in your project +npm install /tmp/codeupipe/codeupipe-0.1.0.tgz +npm install --save-dev /tmp/codeupipe/codeupipe-lint-0.1.0.tgz /tmp/codeupipe/codeupipe-compile-0.1.0.tgz +``` + +Install the three files in one project together: the two tools need +`codeupipe` 0.1.0, and npm takes it from the file that you install. ## The eight primitives diff --git a/packages/codeupipe-ts/package.json b/packages/codeupipe-ts/package.json index dce99da..eed8fbf 100644 --- a/packages/codeupipe-ts/package.json +++ b/packages/codeupipe-ts/package.json @@ -1,6 +1,7 @@ { "name": "codeupipe", "version": "0.1.0", + "private": true, "description": "A TypeScript library for writing a program as a pipeline of small steps.", "license": "Apache-2.0", "repository": {