mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 17:34:47 -05:00
feat: support wildcards in npm workspaces (#24471)
Implemented in https://github.com/denoland/deno_config/pull/74 Closes https://github.com/denoland/deno/issues/24420
This commit is contained in:
parent
d472c48b38
commit
e30ad77ffa
10 changed files with 37 additions and 3 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -1307,9 +1307,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "deno_config"
|
||||
version = "0.20.1"
|
||||
version = "0.20.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ff203375858a92c7afa82324e89ff1f84c04fb456613135c4abccc6b8f31e8e5"
|
||||
checksum = "acd69b394ee336e02ac28cf412a543f9e83d79c8e6584a530940712fa6c01885"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"deno_semver",
|
||||
|
|
|
@ -101,7 +101,7 @@ console_static_text = "=0.8.1"
|
|||
data-encoding = "2.3.3"
|
||||
data-url = "=0.3.0"
|
||||
deno_cache_dir = "=0.10.0"
|
||||
deno_config = { version = "=0.20.1", default-features = false }
|
||||
deno_config = { version = "=0.20.2", default-features = false }
|
||||
dlopen2 = "0.6.1"
|
||||
ecb = "=0.1.2"
|
||||
elliptic-curve = { version = "0.13.4", features = ["alloc", "arithmetic", "ecdh", "std", "pem"] }
|
||||
|
|
4
tests/specs/npm/workspace_wildcards/__test__.jsonc
Normal file
4
tests/specs/npm/workspace_wildcards/__test__.jsonc
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"args": "run --node-modules-dir=false main.ts",
|
||||
"output": "main.out"
|
||||
}
|
2
tests/specs/npm/workspace_wildcards/main.out
Normal file
2
tests/specs/npm/workspace_wildcards/main.out
Normal file
|
@ -0,0 +1,2 @@
|
|||
3
|
||||
7
|
5
tests/specs/npm/workspace_wildcards/main.ts
Normal file
5
tests/specs/npm/workspace_wildcards/main.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
import { add } from "npm:@denotest/a";
|
||||
import { subtract } from "npm:@denotest/b";
|
||||
|
||||
console.log(add(1, 2));
|
||||
console.log(add(4, 3));
|
5
tests/specs/npm/workspace_wildcards/package.json
Normal file
5
tests/specs/npm/workspace_wildcards/package.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
export function add(a: number, b: number): number {
|
||||
return a + b;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"name": "@denotest/a",
|
||||
"version": "1.0.0",
|
||||
"exports": {
|
||||
".": "./mod.ts"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
export function subtract(a: number, b: number): number {
|
||||
return a - b;
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"name": "@denotest/b",
|
||||
"version": "1.0.0",
|
||||
"main": "./file.ts"
|
||||
}
|
Loading…
Add table
Reference in a new issue