diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..4288eb1 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,41 @@ +name: Publish + +on: + push: + tags: + - '[0-9]+.[0-9]+.[0-9]+*' # Semver-Tag + +permissions: + id-token: write # Required for OIDC + contents: read + +jobs: + Publish: + runs-on: ubuntu-latest + steps: + + # Checkout + - uses: actions/checkout@v4 + + # Node + - uses: actions/setup-node@v4 + with: + node-version: '20' + registry-url: 'https://registry.npmjs.org' + + # Update + - name: Update + run: npm install npm -g + + # Install + - name: Build + run: npm install + + # Build + - name: Build + run: npm run build + + # Publish + - name: Publish + run: npm publish sinclair-typebox-*.tgz --provenance --access public + working-directory: target/build \ No newline at end of file diff --git a/changelog/0.34.0.md b/changelog/0.34.0.md index db216fb..ba102d5 100644 --- a/changelog/0.34.0.md +++ b/changelog/0.34.0.md @@ -3,6 +3,8 @@ --- ### Revision Updates +- [Revision 0.34.42](https://github.com/sinclairzx81/typebox/pull/1310) + - Enable Forward Type Inference Compatibility with TypeBox V1 - [Revision 0.34.41](https://github.com/sinclairzx81/typebox/pull/1310) - Disable Node10 Module Resolution | TS7 Deprecation Warning. - [Revision 0.34.40](https://github.com/sinclairzx81/typebox/pull/1293) diff --git a/hammer.mjs b/hammer.mjs index 1b1623e..7da1deb 100644 --- a/hammer.mjs +++ b/hammer.mjs @@ -110,19 +110,9 @@ export async function install_local() { // ------------------------------------------------------------- // Publish // ------------------------------------------------------------- -export async function publish(otp, target = 'target/build') { - const { version } = JSON.parse(Fs.readFileSync('package.json', 'utf8')) - if(version.includes('-dev')) throw Error(`package version should not include -dev specifier`) - await shell(`cd ${target} && npm publish sinclair-typebox-${version}.tgz --access=public --otp ${otp}`) +export async function publish(target = 'target/build') { + const { name, version } = JSON.parse(Fs.readFileSync(`${target}/package.json`, 'utf8')) + console.log('publishing ... ', { name, version }) await shell(`git tag ${version}`) await shell(`git push origin ${version}`) -} - -// ------------------------------------------------------------- -// Publish-Dev -// ------------------------------------------------------------- -export async function publish_dev(otp, target = 'target/build') { - const { version } = JSON.parse(Fs.readFileSync(`${target}/package.json`, 'utf8')) - if(!version.includes('-dev')) throw Error(`development package version should include -dev specifier`) - await shell(`cd ${target} && npm publish sinclair-typebox-${version}.tgz --access=public --otp ${otp} --tag dev`) } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index ed66a3f..ff6fe0f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@sinclair/typebox", - "version": "0.34.41", + "version": "0.34.42", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@sinclair/typebox", - "version": "0.34.41", + "version": "0.34.42", "license": "MIT", "devDependencies": { "@arethetypeswrong/cli": "^0.13.2", @@ -340,10 +340,11 @@ } }, "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -1086,10 +1087,11 @@ } }, "node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", "dev": true, + "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", @@ -1244,10 +1246,11 @@ } }, "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -2278,9 +2281,9 @@ "dev": true }, "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "requires": { "balanced-match": "^1.0.0" @@ -2722,9 +2725,9 @@ "dev": true }, "glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", "dev": true, "requires": { "foreground-child": "^3.1.0", @@ -2832,9 +2835,9 @@ } }, "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "dev": true, "requires": { "argparse": "^2.0.1" diff --git a/package.json b/package.json index fc3c42e..0169a94 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sinclair/typebox", - "version": "0.34.41", + "version": "0.34.42", "description": "Json Schema Type Builder with Static Type Resolution for TypeScript", "keywords": [ "typescript", @@ -12,7 +12,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/sinclairzx81/typebox" + "url": "https://github.com/sinclairzx81/typebox-legacy" }, "scripts": { "test:typescript": "hammer task test_typescript", diff --git a/readme.md b/readme.md index f7c0aa3..4e7f195 100644 --- a/readme.md +++ b/readme.md @@ -2,7 +2,7 @@

TypeBox Legacy

-

OIDC Publishing for TypeBox Legacy

+

Json Schema Type Builder with Static Type Resolution for TypeScript

@@ -51,7 +51,7 @@ type T = Static // type T = { ## Overview -> ⚠️ This repository is the OIDC publishing environment for legacy TypeBox (pre-1.0 revisions). This project publishes to the `@sinclair/typebox` scope on NPM. For the versions 1.0 and above, visit https://github.com/sinclairzx81/typebox +> ⚠️ TypeBox versions (pre-1.0) continue active maintenance through 2026 and beyond. This repository services as the OIDC publishing environment for the `@sinclair/typebox` package scope on NPM. For TypeBox versions 1.0 and above, refer to https://github.com/sinclairzx81/typebox TypeBox is a runtime type builder that creates in-memory Json Schema objects that infer as TypeScript types. The schematics produced by this library are designed to match the static type checking rules of the TypeScript compiler. TypeBox offers a unified type that can be statically checked by TypeScript and runtime asserted using standard Json Schema validation.