diff --git a/.npmrc b/.npmrc index 1a6ad56..42026c1 100644 --- a/.npmrc +++ b/.npmrc @@ -1,5 +1,7 @@ # recommended for projects using rules_js # @see https://docs.aspect.build/rules/aspect_rules_js/docs/pnpm/#hoisting hoist=false - -lockfile-include-tarball-url=true \ No newline at end of file +# for pnpm +lockfile-include-tarball-url=true +# warn about invalid node version, but not fail +engine-strict=false \ No newline at end of file diff --git a/README.md b/README.md index 85af013..9e41bfe 100644 --- a/README.md +++ b/README.md @@ -39,12 +39,16 @@ Each time dependencies change/get updated, run `pnpm install` (toolchains use `p - [pnpm](https://pnpm.io) - [typescript](https://www.typescriptlang.org/) +Note: `package.json` maximum versions are mandated from the toolchains. Check the [WORKSPACE](WORKSPACE) file for more details. + For `pnpm`, alternatively can use the `rules_js` provisioned one, e.g.: ```bash bazelisk run -- @pnpm//:pnpm --dir $PWD list ``` +But note that you'll need to instruct it extra configuration (runs from a sandbox). + ### Recommendations - [Bazel plugin for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=BazelBuild.vscode-bazel) diff --git a/WORKSPACE b/WORKSPACE index cb445b4..a3d07f8 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -48,9 +48,12 @@ http_archive( # ------------------------ +# pnpm version dependant on rules_js +# https://github.com/aspect-build/rules_js/releases/latest -> npm/private/versions.bzl load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies") rules_js_dependencies() +# TypeScript version dependant on rules_ts # https://github.com/aspect-build/rules_ts/releases/latest -> ts/private/versions.bzl # check always latest version *released* load("@aspect_rules_ts//ts:repositories.bzl", "rules_ts_dependencies") @@ -59,6 +62,7 @@ rules_ts_dependencies(ts_version_from = "//:package.json") load("@bazel_features//:deps.bzl", "bazel_features_deps") bazel_features_deps() +# NodeJS version dependant on rules_nodejs # https://github.com/bazelbuild/rules_nodejs/releases/latest -> nodejs/private/node_versions.bzl # check always latest version *released* load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains") diff --git a/package.json b/package.json index c37af6d..b5d9484 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,10 @@ "scripts": { "test": "bazel test //..." }, + "engines": { + "node": "20.12.1" + }, + "packageManager": "pnpm@8.15.3", "dependencies": { }, "devDependencies": {