Skip to content

Commit

Permalink
feat: support wildcards in npm workspaces (denoland#24471)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Jul 9, 2024
1 parent d472c48 commit e30ad77
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
4 changes: 4 additions & 0 deletions tests/specs/npm/workspace_wildcards/__test__.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"args": "run --node-modules-dir=false main.ts",
"output": "main.out"
}
2 changes: 2 additions & 0 deletions tests/specs/npm/workspace_wildcards/main.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
3
7
5 changes: 5 additions & 0 deletions tests/specs/npm/workspace_wildcards/main.ts
Original file line number Diff line number Diff line change
@@ -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 changes: 5 additions & 0 deletions tests/specs/npm/workspace_wildcards/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"workspaces": [
"packages/*"
]
}
3 changes: 3 additions & 0 deletions tests/specs/npm/workspace_wildcards/packages/package-a/mod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function add(a: number, b: number): number {
return a + b;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "@denotest/a",
"version": "1.0.0",
"exports": {
".": "./mod.ts"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function subtract(a: number, b: number): number {
return a - b;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "@denotest/b",
"version": "1.0.0",
"main": "./file.ts"
}

0 comments on commit e30ad77

Please sign in to comment.