From 587723bcf314591bb5dfe40d0be002763101edaf Mon Sep 17 00:00:00 2001 From: per1234 Date: Mon, 7 Oct 2024 00:48:42 -0700 Subject: [PATCH] Configure npm to enforce standard project Node.js version This will produce an error if a contributor attempts to run an npm command in the project using an unsupported version of Node.js. --- .github/workflows/check-npm.yml | 2 ++ .github/workflows/check-packaging-ncc-typescript-npm.yml | 2 ++ .npmrc | 3 +++ 3 files changed, 7 insertions(+) create mode 100644 .npmrc diff --git a/.github/workflows/check-npm.yml b/.github/workflows/check-npm.yml index 72785d7..ab13ea2 100644 --- a/.github/workflows/check-npm.yml +++ b/.github/workflows/check-npm.yml @@ -5,11 +5,13 @@ on: push: paths: - ".github/workflows/check-npm.ya?ml" + - "**/.npmrc" - "**/package.json" - "**/package-lock.json" pull_request: paths: - ".github/workflows/check-npm.ya?ml" + - "**/.npmrc" - "**/package.json" - "**/package-lock.json" schedule: diff --git a/.github/workflows/check-packaging-ncc-typescript-npm.yml b/.github/workflows/check-packaging-ncc-typescript-npm.yml index bf9b369..f07288f 100644 --- a/.github/workflows/check-packaging-ncc-typescript-npm.yml +++ b/.github/workflows/check-packaging-ncc-typescript-npm.yml @@ -4,6 +4,7 @@ on: push: paths: - ".github/workflows/check-packaging-ncc-typescript-npm.yml" + - ".npmrc" - "lerna.json" - "package.json" - "package-lock.json" @@ -12,6 +13,7 @@ on: pull_request: paths: - ".github/workflows/check-packaging-ncc-typescript-npm.yml" + - ".npmrc" - "lerna.json" - "package.json" - "package-lock.json" diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..2fc27b7 --- /dev/null +++ b/.npmrc @@ -0,0 +1,3 @@ +# See: https://docs.npmjs.com/cli/configuring-npm/npmrc + +engine-strict = true