diff --git a/.github/workflows/docs-only.yml b/.github/workflows/docs-only.yml index 0dfcba9..8fe1b84 100644 --- a/.github/workflows/docs-only.yml +++ b/.github/workflows/docs-only.yml @@ -38,3 +38,4 @@ jobs: publish_dir: docs publish_branch: gh-pages destination_dir: docs + force_orphan: true diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f98af18..97bb23f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,3 +11,4 @@ jobs: with: docs: true script: ci + force_orphan: true diff --git a/package.json b/package.json index a1b65e3..69c71ed 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ }, "homepage": "https://github.com/hildjj/cbor2", "scripts": { - "clean": "rimraf lib coverage docs src/version.ts", + "clean": "rimraf lib coverage docs", "docs": "typedoc && cd web && npm run build", "lint": "eslint .", "start": "cd web && npm start", @@ -35,10 +35,9 @@ "posttest": "npm run build", "test:noBuild": "c8 node --enable-source-maps --test test/*.test.js", "test:web": "cd web && npm test", - "build": "npm run ver && tsc", + "build": "tsc", "build:sourcemap": "npm run build -- --inlineSourceMap", - "ci": "npm run clean && npm run build:sourcemap && npm run lint && npm run test:noBuild", - "ver": "package-extract -st -o src/version.ts" + "ci": "npm run clean && npm run test && npm run lint && npm run docs" }, "keywords": [ "coap", @@ -91,7 +90,6 @@ "cbor-edn": "^0.2.2", "eslint-plugin-jsdoc": "^64.5.4", "eslint": "^10.11.0", - "package-extract": "^4.0.1", "rimraf": "^6.1.3", "superc8": "^12.7.0", "typedoc": "^0.28.20", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 53de998..b8b463b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -194,9 +194,6 @@ importers: eslint-plugin-jsdoc: specifier: ^64.5.4 version: 64.5.4(@typescript/typescript6@6.0.2)(eslint@10.11.0(supports-color@10.2.2))(supports-color@10.2.2) - package-extract: - specifier: ^4.0.1 - version: 4.0.1 rimraf: specifier: ^6.1.3 version: 6.1.3 @@ -3388,11 +3385,6 @@ packages: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} - package-extract@4.0.1: - resolution: {integrity: sha512-g8XyGplFEv0eWR4sFC01P5kBE4V2UAnoSqByLzuDHQNmHX1HvW2IhYQ+PTUVsSuuJ5XZlJaLKSXMzz4UKz7ZZQ==} - engines: {node: '>=22'} - hasBin: true - package-json-from-dist@1.0.1: resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} @@ -7660,11 +7652,6 @@ snapshots: p-try@2.2.0: {} - package-extract@4.0.1: - dependencies: - commander: 15.0.0 - semver: 7.8.5 - package-json-from-dist@1.0.1: {} param-case@3.0.4: diff --git a/src/index.ts b/src/index.ts index 5d8d074..2ac8f0c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -10,8 +10,9 @@ */ import './types.js'; -export {version} from './version.js'; import {CBORcontainer} from './container.js'; +import pkg from '../package.json' with {type: 'json'}; +export const {version} = pkg; export type {DecodeStream, ValueGenerator} from './decodeStream.js'; export type { BaseDecoder,