From 4d066dacd1ee6378f4ca255dcc2177c394ee0493 Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Tue, 10 Oct 2023 09:32:21 -0700 Subject: [PATCH] Add rules_js_external_packages example --- rules_js_external_packages/main/.bazelignore | 3 ++ rules_js_external_packages/main/.bazeliskrc | 1 + rules_js_external_packages/main/.bazelrc | 5 ++ rules_js_external_packages/main/.bazelversion | 1 + rules_js_external_packages/main/.gitignore | 2 + rules_js_external_packages/main/.npmrc | 6 +++ rules_js_external_packages/main/BUILD.bazel | 3 ++ rules_js_external_packages/main/WORKSPACE | 48 +++++++++++++++++++ rules_js_external_packages/main/package.json | 6 +++ .../main/packages/BUILD.bazel | 3 ++ .../main/packages/rigel/BUILD.bazel | 41 ++++++++++++++++ .../main/packages/rigel/index.mjs | 7 +++ .../main/packages/rigel/package.json | 7 +++ .../main/packages/vega/BUILD.bazel | 47 ++++++++++++++++++ .../main/packages/vega/index.mjs | 9 ++++ .../main/packages/vega/package.json | 7 +++ .../main/pnpm-lock.yaml | 40 ++++++++++++++++ .../main/pnpm-workspace.yaml | 2 + rules_js_external_packages/other/.bazelignore | 2 + rules_js_external_packages/other/.bazeliskrc | 1 + rules_js_external_packages/other/.bazelrc | 5 ++ .../other/.bazelversion | 1 + rules_js_external_packages/other/.gitignore | 2 + rules_js_external_packages/other/.npmrc | 6 +++ rules_js_external_packages/other/BUILD.bazel | 3 ++ rules_js_external_packages/other/WORKSPACE | 32 +++++++++++++ rules_js_external_packages/other/package.json | 6 +++ .../other/packages/BUILD.bazel | 0 .../other/packages/packages.bzl | 28 +++++++++++ .../other/packages/rigel/BUILD.bazel | 41 ++++++++++++++++ .../other/packages/rigel/index.mjs | 7 +++ .../other/packages/rigel/package.json | 7 +++ .../other/pnpm-lock.yaml | 26 ++++++++++ .../other/pnpm-workspace.yaml | 2 + 34 files changed, 407 insertions(+) create mode 100644 rules_js_external_packages/main/.bazelignore create mode 120000 rules_js_external_packages/main/.bazeliskrc create mode 100644 rules_js_external_packages/main/.bazelrc create mode 120000 rules_js_external_packages/main/.bazelversion create mode 100644 rules_js_external_packages/main/.gitignore create mode 100644 rules_js_external_packages/main/.npmrc create mode 100644 rules_js_external_packages/main/BUILD.bazel create mode 100644 rules_js_external_packages/main/WORKSPACE create mode 100644 rules_js_external_packages/main/package.json create mode 100644 rules_js_external_packages/main/packages/BUILD.bazel create mode 100644 rules_js_external_packages/main/packages/rigel/BUILD.bazel create mode 100644 rules_js_external_packages/main/packages/rigel/index.mjs create mode 100644 rules_js_external_packages/main/packages/rigel/package.json create mode 100644 rules_js_external_packages/main/packages/vega/BUILD.bazel create mode 100644 rules_js_external_packages/main/packages/vega/index.mjs create mode 100644 rules_js_external_packages/main/packages/vega/package.json create mode 100644 rules_js_external_packages/main/pnpm-lock.yaml create mode 100644 rules_js_external_packages/main/pnpm-workspace.yaml create mode 100644 rules_js_external_packages/other/.bazelignore create mode 120000 rules_js_external_packages/other/.bazeliskrc create mode 100644 rules_js_external_packages/other/.bazelrc create mode 120000 rules_js_external_packages/other/.bazelversion create mode 100644 rules_js_external_packages/other/.gitignore create mode 100644 rules_js_external_packages/other/.npmrc create mode 100644 rules_js_external_packages/other/BUILD.bazel create mode 100644 rules_js_external_packages/other/WORKSPACE create mode 100644 rules_js_external_packages/other/package.json create mode 100644 rules_js_external_packages/other/packages/BUILD.bazel create mode 100644 rules_js_external_packages/other/packages/packages.bzl create mode 100644 rules_js_external_packages/other/packages/rigel/BUILD.bazel create mode 100644 rules_js_external_packages/other/packages/rigel/index.mjs create mode 100644 rules_js_external_packages/other/packages/rigel/package.json create mode 100644 rules_js_external_packages/other/pnpm-lock.yaml create mode 100644 rules_js_external_packages/other/pnpm-workspace.yaml diff --git a/rules_js_external_packages/main/.bazelignore b/rules_js_external_packages/main/.bazelignore new file mode 100644 index 00000000..40567571 --- /dev/null +++ b/rules_js_external_packages/main/.bazelignore @@ -0,0 +1,3 @@ +node_modules +packages/vega/node_modules +packages/rigel/node_modules diff --git a/rules_js_external_packages/main/.bazeliskrc b/rules_js_external_packages/main/.bazeliskrc new file mode 120000 index 00000000..270b9ce4 --- /dev/null +++ b/rules_js_external_packages/main/.bazeliskrc @@ -0,0 +1 @@ +../bazelrc/.bazeliskrc \ No newline at end of file diff --git a/rules_js_external_packages/main/.bazelrc b/rules_js_external_packages/main/.bazelrc new file mode 100644 index 00000000..04287cb5 --- /dev/null +++ b/rules_js_external_packages/main/.bazelrc @@ -0,0 +1,5 @@ +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/.aspect/bazelrc/user.bazelrc diff --git a/rules_js_external_packages/main/.bazelversion b/rules_js_external_packages/main/.bazelversion new file mode 120000 index 00000000..af130ee0 --- /dev/null +++ b/rules_js_external_packages/main/.bazelversion @@ -0,0 +1 @@ +../bazelrc/.bazelversion \ No newline at end of file diff --git a/rules_js_external_packages/main/.gitignore b/rules_js_external_packages/main/.gitignore new file mode 100644 index 00000000..f8d99b9b --- /dev/null +++ b/rules_js_external_packages/main/.gitignore @@ -0,0 +1,2 @@ +node_modules +/bazel-* diff --git a/rules_js_external_packages/main/.npmrc b/rules_js_external_packages/main/.npmrc new file mode 100644 index 00000000..e1585088 --- /dev/null +++ b/rules_js_external_packages/main/.npmrc @@ -0,0 +1,6 @@ +# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on +# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what +# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules). See +# https://github.com/aspect-build/rules_js/blob/7377f2d0387cc2a9251137929b1c53ccdb3fbcf0/docs/npm_import.md#npm_translate_lock +# documentation for more information. +hoist=false diff --git a/rules_js_external_packages/main/BUILD.bazel b/rules_js_external_packages/main/BUILD.bazel new file mode 100644 index 00000000..e98a0452 --- /dev/null +++ b/rules_js_external_packages/main/BUILD.bazel @@ -0,0 +1,3 @@ +load("@npm//:defs.bzl", "npm_link_all_packages") + +npm_link_all_packages(name = "node_modules") diff --git a/rules_js_external_packages/main/WORKSPACE b/rules_js_external_packages/main/WORKSPACE new file mode 100644 index 00000000..47ab0a61 --- /dev/null +++ b/rules_js_external_packages/main/WORKSPACE @@ -0,0 +1,48 @@ +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +local_repository( + name = "other", + path = "../other", +) + +http_archive( + name = "aspect_bazel_lib", + sha256 = "cbf473d630ab67b36461d83b38fdc44e56f45b78d03c405e4958280211124d79", + strip_prefix = "bazel-lib-1.36.0", + url = "https://github.com/aspect-build/bazel-lib/releases/download/v1.36.0/bazel-lib-v1.36.0.tar.gz", +) + +load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies") + +aspect_bazel_lib_dependencies() + +http_archive( + name = "aspect_rules_js", + sha256 = "7ab9776bcca823af361577a1a2ebb9a30d2eb5b94ecc964b8be360f443f714b2", + strip_prefix = "rules_js-1.32.6", + url = "https://github.com/aspect-build/rules_js/releases/download/v1.32.6/rules_js-v1.32.6.tar.gz", +) + +load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies") + +rules_js_dependencies() + +load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains") + +nodejs_register_toolchains( + name = "nodejs", + node_version = DEFAULT_NODE_VERSION, +) + +load("@aspect_rules_js//npm:repositories.bzl", "npm_translate_lock") + +npm_translate_lock( + name = "npm", + npmrc = "//:.npmrc", + pnpm_lock = "//:pnpm-lock.yaml", + verify_node_modules_ignored = "//:.bazelignore", +) + +load("@npm//:repositories.bzl", "npm_repositories") + +npm_repositories() diff --git a/rules_js_external_packages/main/package.json b/rules_js_external_packages/main/package.json new file mode 100644 index 00000000..d1eb917a --- /dev/null +++ b/rules_js_external_packages/main/package.json @@ -0,0 +1,6 @@ +{ + "name": "rules_js_external_packages", + "dependencies": { + "vega": "workspace:*" + } +} diff --git a/rules_js_external_packages/main/packages/BUILD.bazel b/rules_js_external_packages/main/packages/BUILD.bazel new file mode 100644 index 00000000..29dcedf3 --- /dev/null +++ b/rules_js_external_packages/main/packages/BUILD.bazel @@ -0,0 +1,3 @@ +load("@other//packages:packages.bzl", "sync_npm_packages") + +sync_npm_packages() diff --git a/rules_js_external_packages/main/packages/rigel/BUILD.bazel b/rules_js_external_packages/main/packages/rigel/BUILD.bazel new file mode 100644 index 00000000..d369e81a --- /dev/null +++ b/rules_js_external_packages/main/packages/rigel/BUILD.bazel @@ -0,0 +1,41 @@ +load("@aspect_bazel_lib//lib:testing.bzl", "assert_contains") +load("@aspect_rules_js//npm:defs.bzl", "npm_package") +load("@aspect_rules_js//js:defs.bzl", "js_binary", "js_run_binary") +load("@npm//:defs.bzl", "npm_link_all_packages") + +npm_link_all_packages(name = "node_modules") + +npm_package( + name = "rigel", + srcs = [ + "index.mjs", + "package.json", + ], + # This is a perf improvement; the default will be flipped to False in rules_js 2.0 + include_runfiles = False, + visibility = ["//visibility:public"], +) + +js_binary( + name = "rigel_bin", + data = [":node_modules"], + entry_point = "index.mjs", +) + +js_run_binary( + name = "run_rigel_bin", + stdout = "run_rigel_bin_stdout", + tool = ":rigel_bin", +) + +assert_contains( + name = "contains_rigel", + actual = ":run_rigel_bin_stdout", + expected = "rigel", +) + +filegroup( + name = "srcs", + srcs = glob(["**/*"]), + visibility = ["//visibility:public"], +) diff --git a/rules_js_external_packages/main/packages/rigel/index.mjs b/rules_js_external_packages/main/packages/rigel/index.mjs new file mode 100644 index 00000000..d3263d61 --- /dev/null +++ b/rules_js_external_packages/main/packages/rigel/index.mjs @@ -0,0 +1,7 @@ +import chalk from 'chalk'; + +export function whoami() { + return 'rigel'; +} + +console.log(chalk.blue(whoami())); diff --git a/rules_js_external_packages/main/packages/rigel/package.json b/rules_js_external_packages/main/packages/rigel/package.json new file mode 100644 index 00000000..c37f98df --- /dev/null +++ b/rules_js_external_packages/main/packages/rigel/package.json @@ -0,0 +1,7 @@ +{ + "name": "rigel", + "dependencies": { + "chalk": "5.2.0" + }, + "main": "index.mjs" +} diff --git a/rules_js_external_packages/main/packages/vega/BUILD.bazel b/rules_js_external_packages/main/packages/vega/BUILD.bazel new file mode 100644 index 00000000..efd3e6ea --- /dev/null +++ b/rules_js_external_packages/main/packages/vega/BUILD.bazel @@ -0,0 +1,47 @@ +load("@aspect_bazel_lib//lib:testing.bzl", "assert_contains") +load("@aspect_rules_js//npm:defs.bzl", "npm_package") +load("@aspect_rules_js//js:defs.bzl", "js_binary", "js_run_binary") +load("@npm//:defs.bzl", "npm_link_all_packages") + +npm_link_all_packages(name = "node_modules") + +npm_package( + name = "vega", + srcs = [ + "index.mjs", + "package.json", + ], + # This is a perf improvement; the default will be flipped to False in rules_js 2.0 + include_runfiles = False, + visibility = ["//visibility:public"], +) + +js_binary( + name = "vega_bin", + data = [":node_modules"], + entry_point = "index.mjs", +) + +js_run_binary( + name = "run_vega_bin", + stdout = "run_vega_bin_stdout", + tool = ":vega_bin", +) + +assert_contains( + name = "contains_vega", + actual = ":run_vega_bin_stdout", + expected = "vega", +) + +assert_contains( + name = "contains_rigel", + actual = ":run_vega_bin_stdout", + expected = "rigel", +) + +assert_contains( + name = "contains_upper_rigel", + actual = ":run_vega_bin_stdout", + expected = "RIGEL", +) diff --git a/rules_js_external_packages/main/packages/vega/index.mjs b/rules_js_external_packages/main/packages/vega/index.mjs new file mode 100644 index 00000000..96441b19 --- /dev/null +++ b/rules_js_external_packages/main/packages/vega/index.mjs @@ -0,0 +1,9 @@ +import chalk from 'chalk'; +import { whoami as whoisrigel } from 'rigel'; + +export function whoami() { + return chalk.green('vega'); +} + +console.log(whoami()); +console.log(whoisrigel().toUpperCase()); diff --git a/rules_js_external_packages/main/packages/vega/package.json b/rules_js_external_packages/main/packages/vega/package.json new file mode 100644 index 00000000..735b8d91 --- /dev/null +++ b/rules_js_external_packages/main/packages/vega/package.json @@ -0,0 +1,7 @@ +{ + "name": "vega", + "dependencies": { + "chalk": "5.3.0", + "rigel": "workspace:*" + } +} diff --git a/rules_js_external_packages/main/pnpm-lock.yaml b/rules_js_external_packages/main/pnpm-lock.yaml new file mode 100644 index 00000000..3ecfa5f1 --- /dev/null +++ b/rules_js_external_packages/main/pnpm-lock.yaml @@ -0,0 +1,40 @@ +lockfileVersion: '6.1' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + vega: + specifier: workspace:* + version: link:packages/vega + + packages/rigel: + dependencies: + chalk: + specifier: 5.2.0 + version: 5.2.0 + + packages/vega: + dependencies: + chalk: + specifier: 5.3.0 + version: 5.3.0 + rigel: + specifier: workspace:* + version: link:../rigel + +packages: + + /chalk@5.2.0: + resolution: {integrity: sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + dev: false + + /chalk@5.3.0: + resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + dev: false diff --git a/rules_js_external_packages/main/pnpm-workspace.yaml b/rules_js_external_packages/main/pnpm-workspace.yaml new file mode 100644 index 00000000..9a36b405 --- /dev/null +++ b/rules_js_external_packages/main/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +packages: + - 'packages/*' diff --git a/rules_js_external_packages/other/.bazelignore b/rules_js_external_packages/other/.bazelignore new file mode 100644 index 00000000..1bc3ce1a --- /dev/null +++ b/rules_js_external_packages/other/.bazelignore @@ -0,0 +1,2 @@ +node_modules +packages/rigel/node_modules diff --git a/rules_js_external_packages/other/.bazeliskrc b/rules_js_external_packages/other/.bazeliskrc new file mode 120000 index 00000000..270b9ce4 --- /dev/null +++ b/rules_js_external_packages/other/.bazeliskrc @@ -0,0 +1 @@ +../bazelrc/.bazeliskrc \ No newline at end of file diff --git a/rules_js_external_packages/other/.bazelrc b/rules_js_external_packages/other/.bazelrc new file mode 100644 index 00000000..04287cb5 --- /dev/null +++ b/rules_js_external_packages/other/.bazelrc @@ -0,0 +1,5 @@ +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/.aspect/bazelrc/user.bazelrc diff --git a/rules_js_external_packages/other/.bazelversion b/rules_js_external_packages/other/.bazelversion new file mode 120000 index 00000000..af130ee0 --- /dev/null +++ b/rules_js_external_packages/other/.bazelversion @@ -0,0 +1 @@ +../bazelrc/.bazelversion \ No newline at end of file diff --git a/rules_js_external_packages/other/.gitignore b/rules_js_external_packages/other/.gitignore new file mode 100644 index 00000000..f8d99b9b --- /dev/null +++ b/rules_js_external_packages/other/.gitignore @@ -0,0 +1,2 @@ +node_modules +/bazel-* diff --git a/rules_js_external_packages/other/.npmrc b/rules_js_external_packages/other/.npmrc new file mode 100644 index 00000000..e1585088 --- /dev/null +++ b/rules_js_external_packages/other/.npmrc @@ -0,0 +1,6 @@ +# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on +# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what +# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules). See +# https://github.com/aspect-build/rules_js/blob/7377f2d0387cc2a9251137929b1c53ccdb3fbcf0/docs/npm_import.md#npm_translate_lock +# documentation for more information. +hoist=false diff --git a/rules_js_external_packages/other/BUILD.bazel b/rules_js_external_packages/other/BUILD.bazel new file mode 100644 index 00000000..e98a0452 --- /dev/null +++ b/rules_js_external_packages/other/BUILD.bazel @@ -0,0 +1,3 @@ +load("@npm//:defs.bzl", "npm_link_all_packages") + +npm_link_all_packages(name = "node_modules") diff --git a/rules_js_external_packages/other/WORKSPACE b/rules_js_external_packages/other/WORKSPACE new file mode 100644 index 00000000..524ea7e7 --- /dev/null +++ b/rules_js_external_packages/other/WORKSPACE @@ -0,0 +1,32 @@ +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +http_archive( + name = "aspect_rules_js", + sha256 = "7ab9776bcca823af361577a1a2ebb9a30d2eb5b94ecc964b8be360f443f714b2", + strip_prefix = "rules_js-1.32.6", + url = "https://github.com/aspect-build/rules_js/releases/download/v1.32.6/rules_js-v1.32.6.tar.gz", +) + +load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies") + +rules_js_dependencies() + +load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains") + +nodejs_register_toolchains( + name = "nodejs", + node_version = DEFAULT_NODE_VERSION, +) + +load("@aspect_rules_js//npm:repositories.bzl", "npm_translate_lock") + +npm_translate_lock( + name = "npm", + npmrc = "//:.npmrc", + pnpm_lock = "//:pnpm-lock.yaml", + verify_node_modules_ignored = "//:.bazelignore", +) + +load("@npm//:repositories.bzl", "npm_repositories") + +npm_repositories() diff --git a/rules_js_external_packages/other/package.json b/rules_js_external_packages/other/package.json new file mode 100644 index 00000000..b13f4782 --- /dev/null +++ b/rules_js_external_packages/other/package.json @@ -0,0 +1,6 @@ +{ + "name": "rules_js_external_packages", + "dependencies": { + "rigel": "workspace:*" + } +} diff --git a/rules_js_external_packages/other/packages/BUILD.bazel b/rules_js_external_packages/other/packages/BUILD.bazel new file mode 100644 index 00000000..e69de29b diff --git a/rules_js_external_packages/other/packages/packages.bzl b/rules_js_external_packages/other/packages/packages.bzl new file mode 100644 index 00000000..e95756e6 --- /dev/null +++ b/rules_js_external_packages/other/packages/packages.bzl @@ -0,0 +1,28 @@ +load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files") +load("@aspect_bazel_lib//lib:copy_to_directory.bzl", "copy_to_directory") + +PACKAGES = ["rigel"] + +def sync_npm_packages(packages = PACKAGES): + """ + Sync npm packages from @other to this bazel package + + Args: + packages: A list of package names to sync + """ + files = {} + + for p in packages: + copy_to_directory( + name = "sync_{}".format(p), + srcs = ["@other//packages/{}:srcs".format(p)], + include_external_repositories = ["other"], + root_paths = [], + replace_prefixes = {"packages/{}/".format(p): ""}, + ) + files[":{}".format(p)] = "sync_{}".format(p) + + write_source_files( + name = "other_packages", + files = files, + ) diff --git a/rules_js_external_packages/other/packages/rigel/BUILD.bazel b/rules_js_external_packages/other/packages/rigel/BUILD.bazel new file mode 100644 index 00000000..d369e81a --- /dev/null +++ b/rules_js_external_packages/other/packages/rigel/BUILD.bazel @@ -0,0 +1,41 @@ +load("@aspect_bazel_lib//lib:testing.bzl", "assert_contains") +load("@aspect_rules_js//npm:defs.bzl", "npm_package") +load("@aspect_rules_js//js:defs.bzl", "js_binary", "js_run_binary") +load("@npm//:defs.bzl", "npm_link_all_packages") + +npm_link_all_packages(name = "node_modules") + +npm_package( + name = "rigel", + srcs = [ + "index.mjs", + "package.json", + ], + # This is a perf improvement; the default will be flipped to False in rules_js 2.0 + include_runfiles = False, + visibility = ["//visibility:public"], +) + +js_binary( + name = "rigel_bin", + data = [":node_modules"], + entry_point = "index.mjs", +) + +js_run_binary( + name = "run_rigel_bin", + stdout = "run_rigel_bin_stdout", + tool = ":rigel_bin", +) + +assert_contains( + name = "contains_rigel", + actual = ":run_rigel_bin_stdout", + expected = "rigel", +) + +filegroup( + name = "srcs", + srcs = glob(["**/*"]), + visibility = ["//visibility:public"], +) diff --git a/rules_js_external_packages/other/packages/rigel/index.mjs b/rules_js_external_packages/other/packages/rigel/index.mjs new file mode 100644 index 00000000..d3263d61 --- /dev/null +++ b/rules_js_external_packages/other/packages/rigel/index.mjs @@ -0,0 +1,7 @@ +import chalk from 'chalk'; + +export function whoami() { + return 'rigel'; +} + +console.log(chalk.blue(whoami())); diff --git a/rules_js_external_packages/other/packages/rigel/package.json b/rules_js_external_packages/other/packages/rigel/package.json new file mode 100644 index 00000000..c37f98df --- /dev/null +++ b/rules_js_external_packages/other/packages/rigel/package.json @@ -0,0 +1,7 @@ +{ + "name": "rigel", + "dependencies": { + "chalk": "5.2.0" + }, + "main": "index.mjs" +} diff --git a/rules_js_external_packages/other/pnpm-lock.yaml b/rules_js_external_packages/other/pnpm-lock.yaml new file mode 100644 index 00000000..7deb3347 --- /dev/null +++ b/rules_js_external_packages/other/pnpm-lock.yaml @@ -0,0 +1,26 @@ +lockfileVersion: '6.1' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + rigel: + specifier: workspace:* + version: link:packages/rigel + + packages/rigel: + dependencies: + chalk: + specifier: 5.2.0 + version: 5.2.0 + +packages: + + /chalk@5.2.0: + resolution: {integrity: sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + dev: false diff --git a/rules_js_external_packages/other/pnpm-workspace.yaml b/rules_js_external_packages/other/pnpm-workspace.yaml new file mode 100644 index 00000000..9a36b405 --- /dev/null +++ b/rules_js_external_packages/other/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +packages: + - 'packages/*'