Skip to content

Commit

Permalink
Renames @npm_rules_js workspace to @npm.
Browse files Browse the repository at this point in the history
Refs #63.

Now that the `@build_bazel_rules_nodejs` version of `@npm` has been delete, it has freed up the name for the `@aspect_rules_js` version to use.
  • Loading branch information
dgp1130 committed Feb 18, 2023
1 parent aad2e69 commit 2d68423
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ load("@aspect_rules_ts//ts:defs.bzl", "ts_config")
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@bazel_skylib//lib:dicts.bzl", "dicts")
load("@bazel_skylib//rules:build_test.bzl", "build_test")
load("@npm_rules_js//:defs.bzl", "npm_link_all_packages")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("//tools/publish:npm_publish.bzl", "npm_publish")
load("//tools/stamping:stamp_package.bzl", "stamp_package")
load("//tools:typescript.bzl", "types_only")
Expand Down
8 changes: 3 additions & 5 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,16 @@ nodejs_register_toolchains(
node_version = "16.10.0",
)

# Load the `@aspect_rules_js` version of the `@npm` workspace. Named `@npm_rules_js` to avoid
# conflicting with the existing workspace from `@build_bazel_rules_nodejs`.
# TODO(#63): Rename to `@npm` once migrated off `@build_bazel_rules_nodejs`.
# Install NPM packages from the lockfile.
load("@aspect_rules_js//npm:npm_import.bzl", "npm_translate_lock")
npm_translate_lock(
name = "npm_rules_js",
name = "npm",
pnpm_lock = "//:pnpm-lock.yaml",
npmrc = "//:.npmrc",
verify_node_modules_ignored = "//:.bazelignore",
)

load("@npm_rules_js//:repositories.bzl", "npm_repositories")
load("@npm//:repositories.bzl", "npm_repositories")
npm_repositories()

http_archive(
Expand Down
2 changes: 1 addition & 1 deletion npm_repositories.bzl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@jasmine//:npm_repositories.bzl", jasmine_npm_repositories = "npm_repositories")
load("@npm_rules_js//:repositories.bzl", js_npm_repositories = "npm_repositories")
load("@npm//:repositories.bzl", js_npm_repositories = "npm_repositories")
load("@rollup//:npm_repositories.bzl", rollup_npm_repositories = "npm_repositories")

def npm_repositories():
Expand Down
2 changes: 1 addition & 1 deletion packages/rules_prerender/web_resources_devserver.bzl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Defines `web_resources_devserver()` functionality."""

load("@aspect_rules_js//js:defs.bzl", "js_run_devserver")
load("@npm_rules_js//:http-server/package_json.bzl", http_server_bin = "bin")
load("@npm//:http-server/package_json.bzl", http_server_bin = "bin")
load("//common:label.bzl", "absolute", "file_path_of")

def web_resources_devserver(
Expand Down
2 changes: 1 addition & 1 deletion repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ load("@aspect_rules_ts//ts:repositories.bzl", "rules_ts_dependencies")
def rules_prerender_repositories():
rules_js_dependencies()
npm_translate_lock(
name = "npm_rules_js",
name = "npm",
pnpm_lock = "@rules_prerender//:pnpm-lock.yaml",
npmrc = "@rules_prerender//:.npmrc",
)
Expand Down

0 comments on commit 2d68423

Please sign in to comment.