-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(workspace): support wildcard packages (#26568)
This commit adds support for wildcard packages in `workspace` configuration option in `deno.json`. This is now supported: ``` { "workspace": [ "./packages/*" ] } ``` Closes #25783
- Loading branch information
1 parent
331f101
commit 69879d8
Showing
14 changed files
with
73 additions
and
3 deletions.
There are no files selected for viewing
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
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,5 @@ | ||
{ | ||
"args": "run -L debug -A main.ts", | ||
"output": "main.out", | ||
"tempDir": true | ||
} |
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,8 @@ | ||
{ | ||
"workspace": [ | ||
"./packages/*" | ||
], | ||
"imports": { | ||
"chalk": "npm:chalk" | ||
} | ||
} |
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,22 @@ | ||
[WILDCARD]Workspace config generated this import map { | ||
"imports": { | ||
"chalk": "npm:chalk", | ||
"chalk/": "npm:/chalk/" | ||
}, | ||
"scopes": { | ||
"./packages/bar/": { | ||
"@/": "./packages/bar/", | ||
"secret_mod/": "./packages/bar/some_mod/" | ||
}, | ||
"./packages/foo/": { | ||
"~/": "./packages/foo/", | ||
"foo/": "./packages/foo/bar/" | ||
} | ||
} | ||
} | ||
[WILDCARD] | ||
hello from foo | ||
buzz from foo | ||
hello from bar | ||
buzz from bar | ||
[Function: chalk][WILDCARD] |
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,5 @@ | ||
import chalk from "chalk"; | ||
import "./packages/foo/mod.ts"; | ||
import "./packages/bar/mod.ts"; | ||
|
||
console.log(chalk); |
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,8 @@ | ||
{ | ||
"name": "asdfasdfasdf", | ||
"version": "0.0.0", | ||
"imports": { | ||
"@/": "./", | ||
"secret_mod/": "./some_mod/" | ||
} | ||
} |
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 @@ | ||
export const buzz = "buzz from bar"; |
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,5 @@ | ||
import { hello } from "secret_mod/hello.ts"; | ||
import { buzz } from "@/fizz/buzz.ts"; | ||
|
||
console.log(hello); | ||
console.log(buzz); |
1 change: 1 addition & 0 deletions
1
tests/specs/run/workspaces/wildcard/packages/bar/some_mod/hello.ts
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 @@ | ||
export const hello = "hello from bar"; |
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 @@ | ||
export const hello = "hello from foo"; |
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,8 @@ | ||
{ | ||
"name": "qwerqwer", | ||
"version": "0.0.0", | ||
"imports": { | ||
"~/": "./", | ||
"foo/": "./bar/" | ||
} | ||
} |
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 @@ | ||
export const buzz = "buzz from foo"; |
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,5 @@ | ||
import { hello } from "foo/hello.ts"; | ||
import { buzz } from "~/fizz/buzz.ts"; | ||
|
||
console.log(hello); | ||
console.log(buzz); |