mirror of
https://github.com/denoland/deno.git
synced 2025-10-02 23:24:37 +00:00
fix(install): cache json exports of JSR packages (#26552)
Fixes https://github.com/denoland/deno/issues/26509. Ended up being a `deno_graph` bug causing the error to surface. This PR updates `deno_graph` to pick up the fix and reverts the temporary workaround that skipped JSON exports.
This commit is contained in:
parent
a01edb394d
commit
ec968aa5ae
13 changed files with 39 additions and 15 deletions
|
@ -0,0 +1 @@
|
|||
export * from "jsr:@denotest/add@1";
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"a": 1
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
export * from "jsr:@denotest/subtract@1";
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"exports": {
|
||||
"./add": "./add.ts",
|
||||
"./subtract": "./subtract.ts",
|
||||
"./data-json": "./data.json"
|
||||
}
|
||||
}
|
5
tests/registry/jsr/@denotest/multiple-exports/meta.json
Normal file
5
tests/registry/jsr/@denotest/multiple-exports/meta.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"versions": {
|
||||
"1.0.0": {}
|
||||
}
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"tempDir": true,
|
||||
"steps": [
|
||||
{ "args": "install", "output": "install.out" }
|
||||
{ "args": "install", "output": "install.out" },
|
||||
{ "args": "run --cached-only main.ts", "output": "main.out" }
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"imports": {
|
||||
"@denotest/different-deps-per-export": "jsr:@denotest/different-deps-per-export@^1.0.0"
|
||||
"@denotest/multiple-exports": "jsr:@denotest/multiple-exports@^1.0.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
[UNORDERED_START]
|
||||
Download http://127.0.0.1:4250/@denotest/different-deps-per-export/meta.json
|
||||
Download http://127.0.0.1:4250/@denotest/different-deps-per-export/1.0.0_meta.json
|
||||
Download http://127.0.0.1:4250/@denotest/different-deps-per-export/1.0.0/add.ts
|
||||
Download http://127.0.0.1:4250/@denotest/different-deps-per-export/1.0.0/subtract.ts
|
||||
Download http://127.0.0.1:4250/@denotest/multiple-exports/meta.json
|
||||
Download http://127.0.0.1:4250/@denotest/multiple-exports/1.0.0_meta.json
|
||||
Download http://127.0.0.1:4250/@denotest/multiple-exports/1.0.0/add.ts
|
||||
Download http://127.0.0.1:4250/@denotest/multiple-exports/1.0.0/subtract.ts
|
||||
Download http://127.0.0.1:4250/@denotest/multiple-exports/1.0.0/data.json
|
||||
Download http://127.0.0.1:4250/@denotest/add/meta.json
|
||||
Download http://127.0.0.1:4250/@denotest/subtract/meta.json
|
||||
Download http://127.0.0.1:4250/@denotest/add/1.0.0_meta.json
|
||||
|
|
3
tests/specs/install/jsr_exports/main.out
Normal file
3
tests/specs/install/jsr_exports/main.out
Normal file
|
@ -0,0 +1,3 @@
|
|||
3
|
||||
-1
|
||||
{ a: 1 }
|
7
tests/specs/install/jsr_exports/main.ts
Normal file
7
tests/specs/install/jsr_exports/main.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
import { add } from "@denotest/multiple-exports/add";
|
||||
import { subtract } from "@denotest/multiple-exports/subtract";
|
||||
import data from "@denotest/multiple-exports/data-json" with { type: "json" };
|
||||
|
||||
console.log(add(1, 2));
|
||||
console.log(subtract(1, 2));
|
||||
console.log(data);
|
Loading…
Add table
Add a link
Reference in a new issue