Skip to content

Commit

Permalink
Update rollup-plugin-typescript2
Browse files Browse the repository at this point in the history
  • Loading branch information
onigoetz committed Jul 13, 2023
1 parent 0d46cde commit 81efcac
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/dist/rollup-plugin-typescript2.cjs.js b/dist/rollup-plugin-typescript2.cjs.js
index 25216722f1a6a073bee3780f2985e22428e3b6fe..e8b73086a45f2c0db9a62b24c87b415d01ee5f57 100644
index af74bb58700f9b2dc8eb497e349d168ec81c2eda..4537ea276d3a91639b4b0625f2f346ba7d9c0576 100644
--- a/dist/rollup-plugin-typescript2.cjs.js
+++ b/dist/rollup-plugin-typescript2.cjs.js
@@ -27641,9 +27641,9 @@ function printDiagnostics(context, diagnostics, pretty = true) {
Expand All @@ -10,7 +10,7 @@ index 25216722f1a6a073bee3780f2985e22428e3b6fe..e8b73086a45f2c0db9a62b24c87b415d
+ if (e.name.endsWith(".d.ts") || e.name.endsWith(".d.cts") || e.name.endsWith(".d.mts"))
out.dts = e;
- else if (e.name.endsWith(".d.ts.map"))
+ else if (e.name.endsWith(".d.ts.map") || e.name.endsWith(".d.cts.map") || e.name.endsWith(".d.mts.map"))
+ else if (e.name.endsWith(".d.ts.map") || e.name.endsWith(".d.cts.map") || e.name.endsWith(".d.mts.map"))
out.dtsmap = e;
else if (e.name.endsWith(".map"))
out.map = e.text;
Expand All @@ -23,25 +23,16 @@ index 25216722f1a6a073bee3780f2985e22428e3b6fe..e8b73086a45f2c0db9a62b24c87b415d
.concat(automaticTypes)
.map((id) => ({ id, snapshot: this.host.getScriptSnapshot(id) }));
this.checkAmbientTypes();
@@ -28065,7 +28065,7 @@ const typescript = (options) => {
@@ -28067,7 +28067,7 @@ const typescript = (options) => {
const resolved = (_a = result.resolvedModule) === null || _a === void 0 ? void 0 : _a.resolvedFileName;
if (!resolved)
return;
- if (resolved.endsWith(".d.ts"))
+ if (resolved.endsWith(".d.ts") || resolved.endsWith(".d.mts") || resolved.endsWith(".d.cts"))
+ if (resolved.endsWith(".d.ts") || resolved.endsWith(".d.mts") || resolved.endsWith(".d.cts"))
return;
if (!filter(resolved))
return;
@@ -28114,7 +28114,7 @@ const typescript = (options) => {
// Rollup can't see these otherwise, because they are "emit-less" and produce no JS
if (result.references && supportsThisLoad) {
for (const ref of result.references) {
- if (ref.endsWith(".d.ts"))
+ if (ref.endsWith(".d.ts") || ref.endsWith(".d.cts") || ref.endsWith(".d.mts"))
continue;
const module = yield this.resolve(ref, id);
if (!module || transformedFiles.has(module.id)) // check for circular references (per https://rollupjs.org/guide/en/#thisload)
@@ -28201,7 +28201,7 @@ const typescript = (options) => {
@@ -28203,7 +28203,7 @@ const typescript = (options) => {
let entryText = entry.text;
const cachePlaceholder = `${pluginOptions.cacheRoot}/placeholder`;
// modify declaration map sources to correct relative path (only if outputting)
Expand All @@ -50,7 +41,7 @@ index 25216722f1a6a073bee3780f2985e22428e3b6fe..e8b73086a45f2c0db9a62b24c87b415d
const declarationDir = (_output.file ? require$$0$1.dirname(_output.file) : _output.dir);
const parsedText = JSON.parse(entryText);
// invert back to absolute, then make relative to declarationDir
@@ -28221,6 +28221,7 @@ const typescript = (options) => {
@@ -28223,6 +28223,7 @@ const typescript = (options) => {
};
Object.keys(declarations).forEach((key) => {
const { type, map } = declarations[key];
Expand Down
2 changes: 1 addition & 1 deletion packages/crafty-preset-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"devDependencies": {
"fork-ts-checker-webpack-plugin": "8.0.0",
"gulp-typescript": "5.0.1",
"rollup-plugin-typescript2": "0.34.1",
"rollup-plugin-typescript2": "0.35.0",
"ts-jest": "29.1.1",
"ts-loader": "9.4.4"
},
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2856,7 +2856,7 @@ __metadata:
"@swissquote/crafty-preset-eslint": 1.22.3
fork-ts-checker-webpack-plugin: 8.0.0
gulp-typescript: 5.0.1
rollup-plugin-typescript2: 0.34.1
rollup-plugin-typescript2: 0.35.0
schema-utils: 4.2.0
ts-jest: 29.1.1
ts-loader: 9.4.4
Expand Down Expand Up @@ -12477,9 +12477,9 @@ __metadata:
languageName: node
linkType: hard

"rollup-plugin-typescript2@npm:0.34.1":
version: 0.34.1
resolution: "rollup-plugin-typescript2@npm:0.34.1"
"rollup-plugin-typescript2@npm:0.35.0":
version: 0.35.0
resolution: "rollup-plugin-typescript2@npm:0.35.0"
dependencies:
"@rollup/pluginutils": ^4.1.2
find-cache-dir: ^3.3.2
Expand All @@ -12489,13 +12489,13 @@ __metadata:
peerDependencies:
rollup: ">=1.26.3"
typescript: ">=2.4.0"
checksum: 107e66b9ab1aaf4b237564e500ea9de9f2d3f0a81be5139dc753fc76bbf00a1a2230eb1ec59145d2dfc4c4da9be8211f1f3e1370007efe1e24ce45a00905e558
checksum: 633ea3d27595ebbf351d39a8b7a7d1e899aca14a6162e108056f0e9e490eb55f013f60a055dab03a6f2eb4b14a2126417d4a79ba0da5c510bbf610a7856cd720
languageName: node
linkType: hard

"rollup-plugin-typescript2@patch:rollup-plugin-typescript2@npm%3A0.34.1#./.yarn/patches/rollup-plugin-typescript2-npm-0.34.1-6b67180d5c.patch::locator=crafty-workspace%40workspace%3A.":
version: 0.34.1
resolution: "rollup-plugin-typescript2@patch:rollup-plugin-typescript2@npm%3A0.34.1#./.yarn/patches/rollup-plugin-typescript2-npm-0.34.1-6b67180d5c.patch::version=0.34.1&hash=e8506f&locator=crafty-workspace%40workspace%3A."
"rollup-plugin-typescript2@patch:rollup-plugin-typescript2@npm%3A0.35.0#./.yarn/patches/rollup-plugin-typescript2-npm-0.35.0-497fee1760.patch::locator=crafty-workspace%40workspace%3A.":
version: 0.35.0
resolution: "rollup-plugin-typescript2@patch:rollup-plugin-typescript2@npm%3A0.35.0#./.yarn/patches/rollup-plugin-typescript2-npm-0.35.0-497fee1760.patch::version=0.35.0&hash=6a68e1&locator=crafty-workspace%40workspace%3A."
dependencies:
"@rollup/pluginutils": ^4.1.2
find-cache-dir: ^3.3.2
Expand All @@ -12505,7 +12505,7 @@ __metadata:
peerDependencies:
rollup: ">=1.26.3"
typescript: ">=2.4.0"
checksum: 5d503569f6277f437e3a80c6301108d19819f8be48643ba21b27dd7efb536cc1a7408c7315b6d5a4cf04cd4c0609155025fca2f8f9c16c0e834a8fe1076504de
checksum: 521261cdcbb09a27052d2364159607da42692cb12c960dad75b17301f80744386695cc22b95cddef1265841671d473499ef81af217ef8dd8e977b14b3cd00880
languageName: node
linkType: hard

Expand Down

0 comments on commit 81efcac

Please sign in to comment.