diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..ce8764d --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,7 @@ +# Review owners for CI and build configuration. +/.github/ @Fannon +/package.json @Fannon +/package-lock.json @Fannon + +# Review the installer policy with the corresponding package owners. +/.npmrc @Fannon diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..ca79ca5 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 503334c..e1ac514 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,21 +6,23 @@ on: pull_request: branches: [main] +permissions: + contents: read jobs: build: runs-on: ubuntu-latest steps: - - name: Checkout repo - uses: actions/checkout@v7 + - name: Checkout repo + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Setup Node.js + uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version: "26" + - name: Install NPM dependencies + run: npm ci - - name: Setup Node.js - uses: actions/setup-node@v7 - with: - node-version: '24' - - - name: Install NPM dependencies - run: npm ci - - - name: Build - run: npm run build + - name: Build + run: npm run build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 53fc165..d00f8dd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,9 @@ name: Publish Package to NPMJS.org on: - workflow_dispatch: + workflow_dispatch: +permissions: + contents: read + jobs: publish-to-npmjs: permissions: @@ -9,17 +12,17 @@ jobs: runs-on: ubuntu-latest environment: npmjs:@sap/openapi-extensions steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - uses: actions/setup-node@v7 with: - node-version: "24" + persist-credentials: false + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version: "26" # registry-url is required for releasing packages registry-url: "https://registry.npmjs.org" - - name: Install latest npm cli - run: npm install -g npm@latest - + package-manager-cache: false - run: npm ci - name: Publish package @@ -27,3 +30,4 @@ jobs: # --access public is only hard required for the initial release, but it doesn't hurt having it setup # npm version >=11.5.1 required for trusted publisher run: npm publish --provenance --access public + if: github.ref == 'refs/heads/main' diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..f4331a5 --- /dev/null +++ b/.npmrc @@ -0,0 +1,30 @@ +# Keep dependency installs locked and save future additions as exact versions. +package-lock=true +save-exact=true + +# Enforce declared runtime requirements and verify registry TLS. +engine-strict=true +strict-ssl=true + +# Retain trusted project publish hooks; reject unreviewed dependency install scripts. +strict-allow-scripts=true + +# Delay newly published package versions during dependency resolution. +min-release-age=2 + +# Keep installs reproducible. +lockfile-version=3 + +# Enforce engine and peer requirements while retaining documented exceptions. +strict-peer-deps=true + +# Preserve the publish hook; strict dependency-script decisions are enforced by npm >=11.20. +ignore-scripts=false + +# Keep installer output quiet and registry requests bounded. +fund=false +update-notifier=false +fetch-retries=5 +fetch-timeout=60000 + +# Preserve prepublishOnly; strict dependency-script decisions remain enforced. diff --git a/CHANGELOG.md b/CHANGELOG.md index 038ad1b..db373f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Changed +- CI and schema generation use Node.js 26 without imposing a new Node.js minimum on consumers of the published schema package. + - Project renamed to "OpenAPI Extensions for SAP Ecosystem" and so the GitHub repository and NPM package accordingly. ## [[0.16.0](https://github.com/SAP/openapi-extensions/releases/tag/v0.16.0)] - 2026-09-30 diff --git a/README.md b/README.md index ab96226..59ee8d6 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,9 @@ No specific tools are needed to use these schema files. Contributors to this repository will need to run the generator, which requires Node.js to be installed. +The published npm package exports JSON schemas through a small JavaScript wrapper and has no production dependencies. +CI and schema generation use Node.js 26; consumers do not inherit that tooling requirement. + ## Known Issues No known issues. diff --git a/package.json b/package.json index a90670e..f020dbd 100644 --- a/package.json +++ b/package.json @@ -26,5 +26,16 @@ "prettier": "^3.9.9", "tsx": "^4.20.6", "typescript": "7.0.2" + }, + "allowScripts": { + "esbuild@0.28.2": false, + "fsevents@2.3.3": false + }, + "devEngines": { + "packageManager": { + "name": "npm", + "version": ">=11.20.0", + "onFail": "error" + } } }