-
-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add 1p linked deps to e2e/js_image_oci (#1710)
- Loading branch information
1 parent
2791a25
commit 419fe96
Showing
14 changed files
with
167 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
node_modules | ||
pkg/a/node_modules | ||
pkg/b/node_modules | ||
repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
{ | ||
"name": "image", | ||
"dependencies": { | ||
"chalk": "^4.0.0" | ||
"acorn": "8.7.1", | ||
"chalk": "^4.0.0", | ||
"@mycorp/pkg-a": "workspace:*", | ||
"@mycorp/pkg-b": "workspace:*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
load("@aspect_rules_js//npm:defs.bzl", "npm_package") | ||
load("@npm//:defs.bzl", "npm_link_all_packages") | ||
|
||
npm_link_all_packages(name = "node_modules") | ||
|
||
npm_package( | ||
name = "pkg", | ||
srcs = [ | ||
"index.js", | ||
"package.json", | ||
], | ||
data = [ | ||
":node_modules", | ||
], | ||
visibility = ["//visibility:public"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* @fileoverview minimal test program that requires third-party packages from npm | ||
*/ | ||
const acorn = require('acorn') | ||
|
||
function getAcornVersion() { | ||
return acorn.version | ||
} | ||
|
||
function getUuidVersion() { | ||
return require('uuid/package.json').version | ||
} | ||
|
||
module.exports = { | ||
getAcornVersion, | ||
getUuidVersion, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "@mycorp/pkg-a", | ||
"private": true, | ||
"dependencies": { | ||
"uuid": "9.0.1" | ||
}, | ||
"peerDependencies": { | ||
"acorn": "8.x.x" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
load("@aspect_rules_js//js:defs.bzl", "js_library") | ||
load("@npm//:defs.bzl", "npm_link_all_packages") | ||
|
||
npm_link_all_packages(name = "node_modules") | ||
|
||
js_library( | ||
name = "pkg", | ||
srcs = [ | ||
"index.js", | ||
"package.json", | ||
], | ||
visibility = ["//visibility:public"], | ||
# because we're linking this js_library, we must explictly add our npm dependendies to `deps` so | ||
# they are picked up my the linker. npm dependendies in `data` are not propogated through the | ||
# linker when linking a js_libary. | ||
deps = [ | ||
":node_modules", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* @fileoverview minimal test program that requires third-party packages from npm | ||
*/ | ||
const acorn = require('acorn') | ||
|
||
function getAcornVersion() { | ||
return acorn.version | ||
} | ||
|
||
function getUuidVersion() { | ||
return require('uuid/package.json').version | ||
} | ||
|
||
module.exports = { | ||
getAcornVersion, | ||
getUuidVersion, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "@mycorp/pkg-b", | ||
"private": true, | ||
"dependencies": { | ||
"uuid": "8.3.2" | ||
}, | ||
"peerDependencies": { | ||
"acorn": "8.x.x" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
packages: | ||
- '.' | ||
- 'pkg/a' | ||
- 'pkg/b' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters