2 parents ef5dde6 + 1c56f55 commit c7972ceCopy full SHA for c7972ce
1 file changed
scripts/build-npm.ts
@@ -165,9 +165,21 @@ await main(function* (args) {
165
isolatedImports[name] = `npm:${name}@^${siblingVer}`;
166
isolatedImports[`${name}/`] = `npm:${name}@^${siblingVer}/`;
167
}
168
+ // Preserve the manifest fields alongside the rewritten imports: cli/src/cli.ts
169
+ // imports its own deno.json for `version`, so replacing the copy with a bare
170
+ // import map makes that property vanish from the JSON module's type.
171
yield* writeTextFile(
172
join(srcCopy, "deno.json"),
- JSON.stringify({ imports: isolatedImports }, null, 2),
173
+ JSON.stringify(
174
+ {
175
+ name: denoJson.name,
176
+ version: denoJson.version,
177
+ exports: denoJson.exports,
178
+ imports: isolatedImports,
179
+ },
180
+ null,
181
+ 2,
182
+ ),
183
);
184
185
try {
0 commit comments