Skip to content

Commit

Permalink
chore: remove mention of yarn
Browse files Browse the repository at this point in the history
Switch root package manager to pnpm.
Remove clang tools, we'll just use prettier.
Remove stray reference to rules_codeowners which is already removed.
  • Loading branch information
alexeagle authored and jbedard committed Sep 17, 2024
1 parent 1a67b5f commit 20d9b25
Show file tree
Hide file tree
Showing 11 changed files with 2,098 additions and 2,298 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/update-nodejs-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:
schedule:
# run at 01:30 UTC daily
- cron: '30 1 * * *'
- cron: "30 1 * * *"

permissions:
contents: read
Expand All @@ -26,11 +26,11 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14.x'

- name: Run yarn update-nodejs-versions
node-version: "14.x"
- uses: pnpm/action-setup@v4
- name: Run update-nodejs-versions
run: |
yarn run update-nodejs-versions
npm run update-nodejs-versions
bazel run docs:update
- name: Create Pull Request
Expand All @@ -40,7 +40,7 @@ jobs:
commit-message: Update Node.js Versions
title: Update Node.js Versions
body: |
- Updated Node.js Versions using `yarn run update-nodejs-versions`
- Updated Node.js Versions using `npm run update-nodejs-versions`
Auto-generated by [create-pull-request][1]
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ default_stages: [commit]
repos:
# Check formatting and lint for starlark code
- repo: https://github.com/keith/pre-commit-buildifier
rev: 6.4.0
rev: 7.3.1
hooks:
- id: buildifier
- id: buildifier-lint
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
docs/*.md
pnpm-lock.yaml
4 changes: 2 additions & 2 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ It's a lot of work for us to review and accept Pull Requests. Sometimes things c
## In-repo tests

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

bazel test //...

## Integration tests

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

## Debugging
Expand Down
2 changes: 1 addition & 1 deletion nodejs/private/node_versions.bzl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
""" Generated code; do not edit
Update by running yarn update-nodejs-versions
Update by running npm run update-nodejs-versions
"""

# @unsorted-dict-items
Expand Down
6 changes: 3 additions & 3 deletions nodejs/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def _download_node(repository_ctx):
))

def _prepare_node(repository_ctx):
"""Sets up BUILD files and shell wrappers for the versions of Node.js, npm & yarn just set up.
"""Sets up BUILD files and shell wrappers for the versions of Node.js, npm just set up.
Windows and other OSes set up the node runtime with different names and paths, which we hide away via
the BUILD file here.
Expand Down Expand Up @@ -178,7 +178,7 @@ exec "$SCRIPT_DIR/{node}" "$@"
node = node_bin_relative,
))
else:
# Sets PATH for node, npm & yarn and run user script
# Sets PATH for node, npm and run user script
repository_ctx.file("bin/node.cmd", content = """
@echo off
SET SCRIPT_DIR=%~dp0
Expand All @@ -189,7 +189,7 @@ CALL "%SCRIPT_DIR%\\{node}" %*
# The entry points for npm for osx/linux and windows
# Runs npm using appropriate node entry point
# --scripts-prepend-node-path is set to false since the correct paths
# for the Bazel entry points of node, npm & yarn are set in the node
# for the Bazel entry points of node, npm are set in the node
# entry point
for kind in [
{"name": "npm", "script": npm_script_relative},
Expand Down
69 changes: 29 additions & 40 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,31 @@
{
"name": "@bazel/javascript",
"description": "Build JavaScript with Bazel",
"private": true,
"version": "0.0.0",
"keywords": [
"javascript",
"bazel"
],
"homepage": "https://github.com/bazel-contrib/rules_nodejs",
"repository": "https://github.com/bazel-contrib/rules_nodejs.git",
"license": "Apache-2.0",
"engines": {
"node": ">=12 <=18",
"yarn": ">=1.13.0"
},
"devDependencies": {
"@bazel/bazelisk": "^1.10.1",
"@bazel/buildifier": "^3.2.0",
"@bazel/buildozer": "^3.2.0",
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@types/node": "^15.12.2",
"clang-format": "1.5.0",
"conventional-changelog-cli": "^2.0.21",
"husky": "1.3.1"
},
"scripts": {
"// See comment in .bazelrc": "",
"update-codeowners": "./scripts/update_codeowners.sh",
"update-nodejs-versions": "node ./scripts/update-nodejs-versions.js > nodejs/private/node_versions.bzl",
"format": "git-clang-format",
"format-all": "clang-format --glob='{e2e/**/,packages/**/}*.{js,ts}' -i",
"update-changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
},
"husky": {
"hooks": {
"pre-push": "check-clang-format \"yarn format\"",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
}
"name": "@bazel/javascript",
"description": "Build JavaScript with Bazel",
"private": true,
"version": "0.0.0",
"keywords": [
"javascript",
"bazel"
],
"homepage": "https://github.com/bazel-contrib/rules_nodejs",
"repository": "https://github.com/bazel-contrib/rules_nodejs.git",
"license": "Apache-2.0",
"engines": {
"node": ">=12 <=18"
},
"packageManager": "[email protected]",
"devDependencies": {
"@bazel/bazelisk": "^1.10.1",
"@bazel/buildifier": "^3.2.0",
"@bazel/buildozer": "^3.2.0",
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@types/node": "^15.12.2",
"conventional-changelog-cli": "^2.0.21"
},
"scripts": {
"// See comment in .bazelrc": "",
"update-nodejs-versions": "node ./scripts/update-nodejs-versions.js > nodejs/private/node_versions.bzl",
"update-changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
}
}
Loading

0 comments on commit 20d9b25

Please sign in to comment.