Skip to content

Commit 20d9b25

Browse files
alexeaglejbedard
authored andcommitted
chore: remove mention of yarn
Switch root package manager to pnpm. Remove clang tools, we'll just use prettier. Remove stray reference to rules_codeowners which is already removed.
1 parent 1a67b5f commit 20d9b25

File tree

11 files changed

+2098
-2298
lines changed

11 files changed

+2098
-2298
lines changed

.github/workflows/update-nodejs-versions.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
workflow_dispatch:
66
schedule:
77
# run at 01:30 UTC daily
8-
- cron: '30 1 * * *'
8+
- cron: "30 1 * * *"
99

1010
permissions:
1111
contents: read
@@ -26,11 +26,11 @@ jobs:
2626
- name: Setup Node.js
2727
uses: actions/setup-node@v2
2828
with:
29-
node-version: '14.x'
30-
31-
- name: Run yarn update-nodejs-versions
29+
node-version: "14.x"
30+
- uses: pnpm/action-setup@v4
31+
- name: Run update-nodejs-versions
3232
run: |
33-
yarn run update-nodejs-versions
33+
npm run update-nodejs-versions
3434
bazel run docs:update
3535
3636
- name: Create Pull Request
@@ -40,7 +40,7 @@ jobs:
4040
commit-message: Update Node.js Versions
4141
title: Update Node.js Versions
4242
body: |
43-
- Updated Node.js Versions using `yarn run update-nodejs-versions`
43+
- Updated Node.js Versions using `npm run update-nodejs-versions`
4444
4545
Auto-generated by [create-pull-request][1]
4646

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ default_stages: [commit]
99
repos:
1010
# Check formatting and lint for starlark code
1111
- repo: https://github.com/keith/pre-commit-buildifier
12-
rev: 6.4.0
12+
rev: 7.3.1
1313
hooks:
1414
- id: buildifier
1515
- id: buildifier-lint

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
docs/*.md
2+
pnpm-lock.yaml

DEVELOPING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ It's a lot of work for us to review and accept Pull Requests. Sometimes things c
99
## In-repo tests
1010

1111
A number of tests in this repo are designed to function with local repository
12-
paths, meaning they can be run directly, and are faster to execute. The `yarn
12+
paths, meaning they can be run directly, and are faster to execute. The `npm
1313
test` command is a shortcut to exclude integration tests, eg
1414

1515
bazel test //...
1616

1717
## Integration tests
1818

1919
In order to test that the rules work outside of this repo, this repo has full bazel WORKSPACEs for e2e tests
20-
to set up an environment with the package paths matching what end users will see.
20+
to set up an environment with the package paths matching what end users will see.
2121
The end-to-end tests in e2e are built this way.
2222

2323
## Debugging

nodejs/private/node_versions.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
""" Generated code; do not edit
2-
Update by running yarn update-nodejs-versions
2+
Update by running npm run update-nodejs-versions
33
"""
44

55
# @unsorted-dict-items

nodejs/repositories.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def _download_node(repository_ctx):
123123
))
124124

125125
def _prepare_node(repository_ctx):
126-
"""Sets up BUILD files and shell wrappers for the versions of Node.js, npm & yarn just set up.
126+
"""Sets up BUILD files and shell wrappers for the versions of Node.js, npm just set up.
127127
128128
Windows and other OSes set up the node runtime with different names and paths, which we hide away via
129129
the BUILD file here.
@@ -178,7 +178,7 @@ exec "$SCRIPT_DIR/{node}" "$@"
178178
node = node_bin_relative,
179179
))
180180
else:
181-
# Sets PATH for node, npm & yarn and run user script
181+
# Sets PATH for node, npm and run user script
182182
repository_ctx.file("bin/node.cmd", content = """
183183
@echo off
184184
SET SCRIPT_DIR=%~dp0
@@ -189,7 +189,7 @@ CALL "%SCRIPT_DIR%\\{node}" %*
189189
# The entry points for npm for osx/linux and windows
190190
# Runs npm using appropriate node entry point
191191
# --scripts-prepend-node-path is set to false since the correct paths
192-
# for the Bazel entry points of node, npm & yarn are set in the node
192+
# for the Bazel entry points of node, npm are set in the node
193193
# entry point
194194
for kind in [
195195
{"name": "npm", "script": npm_script_relative},

package.json

Lines changed: 29 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,31 @@
11
{
2-
"name": "@bazel/javascript",
3-
"description": "Build JavaScript with Bazel",
4-
"private": true,
5-
"version": "0.0.0",
6-
"keywords": [
7-
"javascript",
8-
"bazel"
9-
],
10-
"homepage": "https://github.com/bazel-contrib/rules_nodejs",
11-
"repository": "https://github.com/bazel-contrib/rules_nodejs.git",
12-
"license": "Apache-2.0",
13-
"engines": {
14-
"node": ">=12 <=18",
15-
"yarn": ">=1.13.0"
16-
},
17-
"devDependencies": {
18-
"@bazel/bazelisk": "^1.10.1",
19-
"@bazel/buildifier": "^3.2.0",
20-
"@bazel/buildozer": "^3.2.0",
21-
"@commitlint/cli": "^12.1.4",
22-
"@commitlint/config-conventional": "^12.1.4",
23-
"@types/node": "^15.12.2",
24-
"clang-format": "1.5.0",
25-
"conventional-changelog-cli": "^2.0.21",
26-
"husky": "1.3.1"
27-
},
28-
"scripts": {
29-
"// See comment in .bazelrc": "",
30-
"update-codeowners": "./scripts/update_codeowners.sh",
31-
"update-nodejs-versions": "node ./scripts/update-nodejs-versions.js > nodejs/private/node_versions.bzl",
32-
"format": "git-clang-format",
33-
"format-all": "clang-format --glob='{e2e/**/,packages/**/}*.{js,ts}' -i",
34-
"update-changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
35-
},
36-
"husky": {
37-
"hooks": {
38-
"pre-push": "check-clang-format \"yarn format\"",
39-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
40-
}
41-
}
2+
"name": "@bazel/javascript",
3+
"description": "Build JavaScript with Bazel",
4+
"private": true,
5+
"version": "0.0.0",
6+
"keywords": [
7+
"javascript",
8+
"bazel"
9+
],
10+
"homepage": "https://github.com/bazel-contrib/rules_nodejs",
11+
"repository": "https://github.com/bazel-contrib/rules_nodejs.git",
12+
"license": "Apache-2.0",
13+
"engines": {
14+
"node": ">=12 <=18"
15+
},
16+
"packageManager": "pnpm@8.11.0",
17+
"devDependencies": {
18+
"@bazel/bazelisk": "^1.10.1",
19+
"@bazel/buildifier": "^3.2.0",
20+
"@bazel/buildozer": "^3.2.0",
21+
"@commitlint/cli": "^12.1.4",
22+
"@commitlint/config-conventional": "^12.1.4",
23+
"@types/node": "^15.12.2",
24+
"conventional-changelog-cli": "^2.0.21"
25+
},
26+
"scripts": {
27+
"// See comment in .bazelrc": "",
28+
"update-nodejs-versions": "node ./scripts/update-nodejs-versions.js > nodejs/private/node_versions.bzl",
29+
"update-changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
30+
}
4231
}

0 commit comments

Comments
 (0)