Skip to content

Commit 0a98750

Browse files
committed
test: add test for backward compatibility with versions before 1.1.2
1 parent 4538c50 commit 0a98750

File tree

7 files changed

+985
-0
lines changed

7 files changed

+985
-0
lines changed

index.test.ts

+5
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,8 @@ test("type-module-config-cjs-import-js", async t => {
2525
await buildTestProject("test-projects/type-module-config-cjs-import-js");
2626
t.pass();
2727
});
28+
29+
test("backward-compatibility-pre-1.1.2-config-cjs", async t => {
30+
await buildTestProject("test-projects/backward-compatibility-pre-1.1.2-config-cjs");
31+
t.pass();
32+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import {test} from "./test.js";
2+
3+
test();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "@softwareventures/resolve-typescript-plugin-test-backward-compatibility-1.1.x-config-cjs",
3+
"type": "module",
4+
"license": "ISC",
5+
"exports": {
6+
".": "./index.js"
7+
},
8+
"types": "index.d.ts",
9+
"scripts": {
10+
"build": "webpack"
11+
},
12+
"dependencies": {
13+
"tslib": "2.3.1"
14+
},
15+
"devDependencies": {
16+
"@softwareventures/tsconfig": "5.1.0",
17+
"resolve-typescript-plugin": "../..",
18+
"ts-loader": "9.2.6",
19+
"typescript": "4.5.4",
20+
"webpack": "5.66.0",
21+
"webpack-cli": "4.9.1"
22+
}
23+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export function test(): void {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "@softwareventures/tsconfig",
3+
"compilerOptions": {
4+
"declaration": false
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const ResolveTypeScriptPlugin = require("resolve-typescript-plugin").default;
2+
3+
module.exports = {
4+
mode: "production",
5+
context: __dirname,
6+
entry: "./index.js",
7+
module: {
8+
rules: [
9+
{
10+
test: /\.tsx?$/,
11+
use: "ts-loader"
12+
}
13+
]
14+
},
15+
resolve: {
16+
plugins: [new ResolveTypeScriptPlugin()]
17+
}
18+
};

0 commit comments

Comments
 (0)