File: dont-check-versions.patch

package info (click to toggle)
node-rollup-plugin-typescript2 0.34.1%2Bds%2B~cs6.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,032 kB
  • sloc: javascript: 1,211; sh: 4; makefile: 2
file content (29 lines) | stat: -rw-r--r-- 1,584 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Description: don't check for versions
Author: Yadd <yadd@debian.org>
Forwarded: not-needed
Last-Update: 2022-12-05

--- a/src/index.ts
+++ b/src/index.ts
@@ -17,8 +17,6 @@
 import { createFilter } from "./get-options-overrides";
 
 // these use globals during testing and are substituted by rollup-plugin-re during builds
-const TS_VERSION_RANGE = (global as any)?.rpt2__TS_VERSION_RANGE || "$TS_VERSION_RANGE";
-const ROLLUP_VERSION_RANGE = (global as any)?.rpt2__ROLLUP_VERSION_RANGE || "$ROLLUP_VERSION_RANGE";
 const RPT2_VERSION = (global as any)?.rpt2__ROLLUP_VERSION_RANGE || "$RPT2_VERSION";
 
 type RPT2Options = Partial<IOptions>;
@@ -136,12 +134,6 @@
 			context.info(`tslib version: ${tslibVersion}`);
 			context.info(`rollup version: ${this.meta.rollupVersion}`);
 
-			if (!satisfies(tsModule.version, TS_VERSION_RANGE, { includePrerelease: true }))
-				context.error(`Installed TypeScript version '${tsModule.version}' is outside of supported range '${TS_VERSION_RANGE}'`);
-
-			if (!satisfies(this.meta.rollupVersion, ROLLUP_VERSION_RANGE, { includePrerelease: true }))
-				context.error(`Installed Rollup version '${this.meta.rollupVersion}' is outside of supported range '${ROLLUP_VERSION_RANGE}'`);
-
 			supportsThisLoad = satisfies(this.meta.rollupVersion, ">=2.60.0", { includePrerelease : true }); // this.load is 2.60.0+ only (c.f. https://github.com/rollup/rollup/blob/master/CHANGELOG.md#2600)
 			if (!supportsThisLoad)
 				context.warn(() => `${yellow("You are using a Rollup version '<2.60.0'")}. This may result in type-only files being ignored.`);