From 5f34d96c0d0916945c1730f4b2968ed09e406cc8 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Wed, 6 Apr 2022 16:07:00 -0700 Subject: [PATCH 01/19] chore!: Remove legacy node-jsx hook --- README.md | 6 ------ index.js | 6 ------ test/fixtures/jsx/4/package.json | 5 ----- test/fixtures/jsx/4/test.jsx | 17 ----------------- 4 files changed, 34 deletions(-) delete mode 100644 test/fixtures/jsx/4/package.json delete mode 100644 test/fixtures/jsx/4/test.jsx diff --git a/README.md b/README.md index f56410c..fa44e6b 100644 --- a/README.md +++ b/README.md @@ -138,12 +138,6 @@ Map file types to modules which provide a [require.extensions] loader. }); }, }, - { - module: 'node-jsx', - register: function(hook) { - hook.install({ extension: '.jsx', harmony: true }); - }, - }, ], '.litcoffee': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], '.liticed': 'iced-coffee-script/register', diff --git a/index.js b/index.js index c003144..3edbc10 100644 --- a/index.js +++ b/index.js @@ -205,12 +205,6 @@ var extensions = { }); }, }, - { - module: 'node-jsx', - register: function(hook) { - hook.install({ extension: '.jsx', harmony: true }); - }, - }, ], '.litcoffee': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], '.liticed': 'iced-coffee-script/register', diff --git a/test/fixtures/jsx/4/package.json b/test/fixtures/jsx/4/package.json deleted file mode 100644 index c475a7d..0000000 --- a/test/fixtures/jsx/4/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "node-jsx": "^0.13.3" - } -} diff --git a/test/fixtures/jsx/4/test.jsx b/test/fixtures/jsx/4/test.jsx deleted file mode 100644 index acfb81c..0000000 --- a/test/fixtures/jsx/4/test.jsx +++ /dev/null @@ -1,17 +0,0 @@ -const React = { - createElement: function(Component){ - return Component(); - } -}; - -// Test harmony arrow functions -const Component = () => { - var trueKey = true; - var falseKey = false; - var subKey = { subProp: 1 }; - // Test harmony object short notation - return { data: { trueKey, falseKey, subKey}}; -}; - -// Test JSX syntax -module.exports = ; From 9516a0964759dd1f66d8876b55a22c1fd2b35ae4 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Wed, 6 Apr 2022 16:16:07 -0700 Subject: [PATCH 02/19] chore!: Remove deprecated typescript-node hook --- README.md | 2 -- index.js | 2 -- test/fixtures/ts/1/package.json | 4 ++-- test/fixtures/ts/1/test.ts | 26 ++++++++++++------------ test/fixtures/ts/2/package.json | 3 +-- test/fixtures/ts/3/package.json | 2 +- test/fixtures/ts/3/test.ts | 24 +++++++++++++--------- test/fixtures/ts/{5 => 4}/.babelrc | 0 test/fixtures/ts/{5 => 4}/component.ts | 0 test/fixtures/ts/4/package.json | 6 +++++- test/fixtures/ts/4/test.ts | 26 +++--------------------- test/fixtures/ts/4/tsconfig.json | 11 ---------- test/fixtures/ts/5/package.json | 7 ++----- test/fixtures/ts/5/test.ts | 16 +++++++++++---- test/fixtures/ts/{7 => 6}/.swcrc | 0 test/fixtures/ts/6/package.json | 4 ++-- test/fixtures/ts/6/test.ts | 22 +++++++++++--------- test/fixtures/ts/7/package.json | 6 ------ test/fixtures/ts/7/test.ts | 15 -------------- test/fixtures/tsx/1/package.json | 3 +-- test/fixtures/tsx/{3 => 2}/.babelrc | 0 test/fixtures/tsx/2/data.tsx | 19 +++++++++++++++++ test/fixtures/tsx/2/package.json | 6 +++++- test/fixtures/tsx/2/test.tsx | 6 ++++-- test/fixtures/tsx/2/tsconfig.json | 12 ----------- test/fixtures/tsx/3/data.tsx | 28 ++++++++++---------------- test/fixtures/tsx/3/package.json | 7 ++----- test/fixtures/tsx/3/test.tsx | 21 ++++++------------- test/fixtures/tsx/{5 => 4}/.swcrc | 0 test/fixtures/tsx/4/data.tsx | 13 ------------ test/fixtures/tsx/4/package.json | 4 ++-- test/fixtures/tsx/4/test.tsx | 23 +++++++++++++-------- test/fixtures/tsx/5/package.json | 6 ------ test/fixtures/tsx/5/test.tsx | 18 ----------------- 34 files changed, 133 insertions(+), 209 deletions(-) rename test/fixtures/ts/{5 => 4}/.babelrc (100%) rename test/fixtures/ts/{5 => 4}/component.ts (100%) delete mode 100644 test/fixtures/ts/4/tsconfig.json rename test/fixtures/ts/{7 => 6}/.swcrc (100%) delete mode 100644 test/fixtures/ts/7/package.json delete mode 100644 test/fixtures/ts/7/test.ts rename test/fixtures/tsx/{3 => 2}/.babelrc (100%) create mode 100644 test/fixtures/tsx/2/data.tsx delete mode 100644 test/fixtures/tsx/2/tsconfig.json rename test/fixtures/tsx/{5 => 4}/.swcrc (100%) delete mode 100644 test/fixtures/tsx/4/data.tsx delete mode 100644 test/fixtures/tsx/5/package.json delete mode 100644 test/fixtures/tsx/5/test.tsx diff --git a/README.md b/README.md index fa44e6b..2b9f289 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,6 @@ Map file types to modules which provide a [require.extensions] loader. }, '.ts': [ 'ts-node/register', - 'typescript-node/register', 'typescript-register', 'typescript-require', 'sucrase/register/ts', @@ -169,7 +168,6 @@ Map file types to modules which provide a [require.extensions] loader. ], '.tsx': [ 'ts-node/register', - 'typescript-node/register', 'sucrase/register', { module: '@babel/register', diff --git a/index.js b/index.js index 3edbc10..08e76bb 100644 --- a/index.js +++ b/index.js @@ -219,7 +219,6 @@ var extensions = { }, '.ts': [ 'ts-node/register', - 'typescript-node/register', 'typescript-register', 'typescript-require', 'sucrase/register/ts', @@ -258,7 +257,6 @@ var extensions = { ], '.tsx': [ 'ts-node/register', - 'typescript-node/register', 'sucrase/register', { module: '@babel/register', diff --git a/test/fixtures/ts/1/package.json b/test/fixtures/ts/1/package.json index e0757af..4101654 100644 --- a/test/fixtures/ts/1/package.json +++ b/test/fixtures/ts/1/package.json @@ -1,6 +1,6 @@ { "dependencies": { - "typescript": "1.5.3", - "typescript-node": "^0.1.3" + "typescript": "1.4.1", + "typescript-register": "^1.1.0" } } diff --git a/test/fixtures/ts/1/test.ts b/test/fixtures/ts/1/test.ts index c4c77e6..be06f12 100644 --- a/test/fixtures/ts/1/test.ts +++ b/test/fixtures/ts/1/test.ts @@ -1,19 +1,19 @@ -var test: { - data: { - trueKey: boolean, - falseKey: boolean, - subKey: { - subProp: number - } - } -} = { +var trueKey: boolean = true; +var falseKey: boolean = false; +var subProp: number = 1; + +var test = { data: { - trueKey: true, - falseKey: false, + trueKey: trueKey, + falseKey: falseKey, subKey: { - subProp: 1 + subProp: subProp } } }; -export default test; +var main = { + default: test +}; + +export = main; diff --git a/test/fixtures/ts/2/package.json b/test/fixtures/ts/2/package.json index 4101654..1d30471 100644 --- a/test/fixtures/ts/2/package.json +++ b/test/fixtures/ts/2/package.json @@ -1,6 +1,5 @@ { "dependencies": { - "typescript": "1.4.1", - "typescript-register": "^1.1.0" + "typescript-require": "^0.2.10" } } diff --git a/test/fixtures/ts/3/package.json b/test/fixtures/ts/3/package.json index 1d30471..dc0534c 100644 --- a/test/fixtures/ts/3/package.json +++ b/test/fixtures/ts/3/package.json @@ -1,5 +1,5 @@ { "dependencies": { - "typescript-require": "^0.2.10" + "sucrase": "^3.12.1" } } diff --git a/test/fixtures/ts/3/test.ts b/test/fixtures/ts/3/test.ts index be06f12..46c3ac2 100644 --- a/test/fixtures/ts/3/test.ts +++ b/test/fixtures/ts/3/test.ts @@ -1,18 +1,24 @@ -var trueKey: boolean = true; -var falseKey: boolean = false; -var subProp: number = 1; - -var test = { +var test: { + data: { + trueKey: boolean, + falseKey: boolean, + subKey: { + subProp: number + } + } +} = { data: { - trueKey: trueKey, - falseKey: falseKey, + trueKey: true, + falseKey: false, subKey: { - subProp: subProp + subProp: 1 } } }; -var main = { +var main: { + default: typeof test +} = { default: test }; diff --git a/test/fixtures/ts/5/.babelrc b/test/fixtures/ts/4/.babelrc similarity index 100% rename from test/fixtures/ts/5/.babelrc rename to test/fixtures/ts/4/.babelrc diff --git a/test/fixtures/ts/5/component.ts b/test/fixtures/ts/4/component.ts similarity index 100% rename from test/fixtures/ts/5/component.ts rename to test/fixtures/ts/4/component.ts diff --git a/test/fixtures/ts/4/package.json b/test/fixtures/ts/4/package.json index dc0534c..5fa8c33 100644 --- a/test/fixtures/ts/4/package.json +++ b/test/fixtures/ts/4/package.json @@ -1,5 +1,9 @@ { "dependencies": { - "sucrase": "^3.12.1" + "@babel/core": "^7.2.2", + "@babel/preset-env": "^7.2.3", + "@babel/preset-react": "^7.0.0", + "@babel/preset-typescript": "^7.1.0", + "@babel/register": "^7.0.0" } } diff --git a/test/fixtures/ts/4/test.ts b/test/fixtures/ts/4/test.ts index 46c3ac2..5c3065b 100644 --- a/test/fixtures/ts/4/test.ts +++ b/test/fixtures/ts/4/test.ts @@ -1,25 +1,5 @@ -var test: { - data: { - trueKey: boolean, - falseKey: boolean, - subKey: { - subProp: number - } - } -} = { - data: { - trueKey: true, - falseKey: false, - subKey: { - subProp: 1 - } - } -}; +import Component from "./component" -var main: { - default: typeof test -} = { - default: test -}; +var test: typeof Component = { ...Component } -export = main; +export default test diff --git a/test/fixtures/ts/4/tsconfig.json b/test/fixtures/ts/4/tsconfig.json deleted file mode 100644 index ca687b6..0000000 --- a/test/fixtures/ts/4/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": false, - "noImplicitAny": false, - "removeComments": true, - "sourceMap": true, - "outDir": ".tmp" - } -} diff --git a/test/fixtures/ts/5/package.json b/test/fixtures/ts/5/package.json index 5fa8c33..b32c446 100644 --- a/test/fixtures/ts/5/package.json +++ b/test/fixtures/ts/5/package.json @@ -1,9 +1,6 @@ { "dependencies": { - "@babel/core": "^7.2.2", - "@babel/preset-env": "^7.2.3", - "@babel/preset-react": "^7.0.0", - "@babel/preset-typescript": "^7.1.0", - "@babel/register": "^7.0.0" + "esbuild": "^0.14.29", + "esbuild-register": "^3.3.2" } } diff --git a/test/fixtures/ts/5/test.ts b/test/fixtures/ts/5/test.ts index 5c3065b..5bd9e99 100644 --- a/test/fixtures/ts/5/test.ts +++ b/test/fixtures/ts/5/test.ts @@ -1,5 +1,13 @@ -import Component from "./component" +function add(x: number, y: number): number { + return x + y; +} -var test: typeof Component = { ...Component } - -export default test +export default { + data: { + trueKey: true as boolean, + falseKey: false as boolean, + subKey: { + subProp: add(0.5, 0.5), + }, + }, +}; diff --git a/test/fixtures/ts/7/.swcrc b/test/fixtures/ts/6/.swcrc similarity index 100% rename from test/fixtures/ts/7/.swcrc rename to test/fixtures/ts/6/.swcrc diff --git a/test/fixtures/ts/6/package.json b/test/fixtures/ts/6/package.json index b32c446..e345156 100644 --- a/test/fixtures/ts/6/package.json +++ b/test/fixtures/ts/6/package.json @@ -1,6 +1,6 @@ { "dependencies": { - "esbuild": "^0.14.29", - "esbuild-register": "^3.3.2" + "@swc/core": "^1.2.110", + "@swc/register": "^0.1.7" } } diff --git a/test/fixtures/ts/6/test.ts b/test/fixtures/ts/6/test.ts index 5bd9e99..9a955db 100644 --- a/test/fixtures/ts/6/test.ts +++ b/test/fixtures/ts/6/test.ts @@ -1,13 +1,15 @@ -function add(x: number, y: number): number { - return x + y; -} - -export default { +var test = { data: { - trueKey: true as boolean, - falseKey: false as boolean, + trueKey: true, + falseKey: false, subKey: { - subProp: add(0.5, 0.5), - }, - }, + subProp: 1 + } + } +}; + +var main = { + default: test }; + +export = main; diff --git a/test/fixtures/ts/7/package.json b/test/fixtures/ts/7/package.json deleted file mode 100644 index e345156..0000000 --- a/test/fixtures/ts/7/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "dependencies": { - "@swc/core": "^1.2.110", - "@swc/register": "^0.1.7" - } -} diff --git a/test/fixtures/ts/7/test.ts b/test/fixtures/ts/7/test.ts deleted file mode 100644 index 9a955db..0000000 --- a/test/fixtures/ts/7/test.ts +++ /dev/null @@ -1,15 +0,0 @@ -var test = { - data: { - trueKey: true, - falseKey: false, - subKey: { - subProp: 1 - } - } -}; - -var main = { - default: test -}; - -export = main; diff --git a/test/fixtures/tsx/1/package.json b/test/fixtures/tsx/1/package.json index b10f5f1..dc0534c 100644 --- a/test/fixtures/tsx/1/package.json +++ b/test/fixtures/tsx/1/package.json @@ -1,6 +1,5 @@ { "dependencies": { - "typescript": "~1.6.0", - "typescript-node": "^0.1.3" + "sucrase": "^3.12.1" } } diff --git a/test/fixtures/tsx/3/.babelrc b/test/fixtures/tsx/2/.babelrc similarity index 100% rename from test/fixtures/tsx/3/.babelrc rename to test/fixtures/tsx/2/.babelrc diff --git a/test/fixtures/tsx/2/data.tsx b/test/fixtures/tsx/2/data.tsx new file mode 100644 index 0000000..e41be4f --- /dev/null +++ b/test/fixtures/tsx/2/data.tsx @@ -0,0 +1,19 @@ +var test: { + data: { + trueKey: boolean, + falseKey: boolean, + subKey: { + subProp: number + } + } +} = { + data: { + trueKey: true, + falseKey: false, + subKey: { + subProp: 1 + } + } +} + +export default test diff --git a/test/fixtures/tsx/2/package.json b/test/fixtures/tsx/2/package.json index dc0534c..5fa8c33 100644 --- a/test/fixtures/tsx/2/package.json +++ b/test/fixtures/tsx/2/package.json @@ -1,5 +1,9 @@ { "dependencies": { - "sucrase": "^3.12.1" + "@babel/core": "^7.2.2", + "@babel/preset-env": "^7.2.3", + "@babel/preset-react": "^7.0.0", + "@babel/preset-typescript": "^7.1.0", + "@babel/register": "^7.0.0" } } diff --git a/test/fixtures/tsx/2/test.tsx b/test/fixtures/tsx/2/test.tsx index c52e28d..fb1c6d4 100644 --- a/test/fixtures/tsx/2/test.tsx +++ b/test/fixtures/tsx/2/test.tsx @@ -1,3 +1,5 @@ +import data from "./data" + const React = { createElement(Component: () => any) { return Component() @@ -12,7 +14,7 @@ const Component = () => { // Test harmony object short notation. return { data: { trueKey, falseKey, subKey } } -}; +} // Test TSX syntax. -export default +export default diff --git a/test/fixtures/tsx/2/tsconfig.json b/test/fixtures/tsx/2/tsconfig.json deleted file mode 100644 index f108464..0000000 --- a/test/fixtures/tsx/2/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": false, - "noImplicitAny": false, - "removeComments": true, - "sourceMap": true, - "outDir": ".tmp", - "jsx": "react" - } -} diff --git a/test/fixtures/tsx/3/data.tsx b/test/fixtures/tsx/3/data.tsx index e41be4f..e2af2a8 100644 --- a/test/fixtures/tsx/3/data.tsx +++ b/test/fixtures/tsx/3/data.tsx @@ -1,19 +1,13 @@ -var test: { - data: { - trueKey: boolean, - falseKey: boolean, - subKey: { - subProp: number - } +export const data: { + trueKey: boolean, + falseKey: boolean, + subKey: { + subProp: number } } = { - data: { - trueKey: true, - falseKey: false, - subKey: { - subProp: 1 - } - } -} - -export default test + trueKey: true, + falseKey: false, + subKey: { + subProp: 1, + }, +}; diff --git a/test/fixtures/tsx/3/package.json b/test/fixtures/tsx/3/package.json index 5fa8c33..b32c446 100644 --- a/test/fixtures/tsx/3/package.json +++ b/test/fixtures/tsx/3/package.json @@ -1,9 +1,6 @@ { "dependencies": { - "@babel/core": "^7.2.2", - "@babel/preset-env": "^7.2.3", - "@babel/preset-react": "^7.0.0", - "@babel/preset-typescript": "^7.1.0", - "@babel/register": "^7.0.0" + "esbuild": "^0.14.29", + "esbuild-register": "^3.3.2" } } diff --git a/test/fixtures/tsx/3/test.tsx b/test/fixtures/tsx/3/test.tsx index fb1c6d4..a5581e3 100644 --- a/test/fixtures/tsx/3/test.tsx +++ b/test/fixtures/tsx/3/test.tsx @@ -1,20 +1,11 @@ -import data from "./data" +/** @jsx jsx */ -const React = { - createElement(Component: () => any) { - return Component() - } -} +import { data } from "./data"; -// Test harmony arrow functions. -const Component = () => { - var trueKey: boolean = true - var falseKey: boolean = false - var subKey = { subProp: 1 } +const Component = (props: object) => ({ data: props }); - // Test harmony object short notation. - return { data: { trueKey, falseKey, subKey } } +function jsx(element: typeof Component, props: object) { + return element(props); } -// Test TSX syntax. -export default +export default ; diff --git a/test/fixtures/tsx/5/.swcrc b/test/fixtures/tsx/4/.swcrc similarity index 100% rename from test/fixtures/tsx/5/.swcrc rename to test/fixtures/tsx/4/.swcrc diff --git a/test/fixtures/tsx/4/data.tsx b/test/fixtures/tsx/4/data.tsx deleted file mode 100644 index e2af2a8..0000000 --- a/test/fixtures/tsx/4/data.tsx +++ /dev/null @@ -1,13 +0,0 @@ -export const data: { - trueKey: boolean, - falseKey: boolean, - subKey: { - subProp: number - } -} = { - trueKey: true, - falseKey: false, - subKey: { - subProp: 1, - }, -}; diff --git a/test/fixtures/tsx/4/package.json b/test/fixtures/tsx/4/package.json index b32c446..e345156 100644 --- a/test/fixtures/tsx/4/package.json +++ b/test/fixtures/tsx/4/package.json @@ -1,6 +1,6 @@ { "dependencies": { - "esbuild": "^0.14.29", - "esbuild-register": "^3.3.2" + "@swc/core": "^1.2.110", + "@swc/register": "^0.1.7" } } diff --git a/test/fixtures/tsx/4/test.tsx b/test/fixtures/tsx/4/test.tsx index a5581e3..c52e28d 100644 --- a/test/fixtures/tsx/4/test.tsx +++ b/test/fixtures/tsx/4/test.tsx @@ -1,11 +1,18 @@ -/** @jsx jsx */ - -import { data } from "./data"; +const React = { + createElement(Component: () => any) { + return Component() + } +} -const Component = (props: object) => ({ data: props }); +// Test harmony arrow functions. +const Component = () => { + var trueKey: boolean = true + var falseKey: boolean = false + var subKey = { subProp: 1 } -function jsx(element: typeof Component, props: object) { - return element(props); -} + // Test harmony object short notation. + return { data: { trueKey, falseKey, subKey } } +}; -export default ; +// Test TSX syntax. +export default diff --git a/test/fixtures/tsx/5/package.json b/test/fixtures/tsx/5/package.json deleted file mode 100644 index e345156..0000000 --- a/test/fixtures/tsx/5/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "dependencies": { - "@swc/core": "^1.2.110", - "@swc/register": "^0.1.7" - } -} diff --git a/test/fixtures/tsx/5/test.tsx b/test/fixtures/tsx/5/test.tsx deleted file mode 100644 index c52e28d..0000000 --- a/test/fixtures/tsx/5/test.tsx +++ /dev/null @@ -1,18 +0,0 @@ -const React = { - createElement(Component: () => any) { - return Component() - } -} - -// Test harmony arrow functions. -const Component = () => { - var trueKey: boolean = true - var falseKey: boolean = false - var subKey = { subProp: 1 } - - // Test harmony object short notation. - return { data: { trueKey, falseKey, subKey } } -}; - -// Test TSX syntax. -export default From fcb2b28d7426d6fc00d94c96938131e5ccef04f2 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Wed, 6 Apr 2022 16:18:37 -0700 Subject: [PATCH 03/19] chore!: Remove deprecated typescript-register hook --- README.md | 1 - index.js | 1 - test/fixtures/ts/1/package.json | 3 +-- test/fixtures/ts/2/package.json | 2 +- test/fixtures/ts/2/test.ts | 24 +++++++++++++++--------- test/fixtures/ts/{4 => 3}/.babelrc | 0 test/fixtures/ts/{4 => 3}/component.ts | 0 test/fixtures/ts/3/package.json | 6 +++++- test/fixtures/ts/3/test.ts | 26 +++----------------------- test/fixtures/ts/3/tsconfig.json | 11 ----------- test/fixtures/ts/4/package.json | 7 ++----- test/fixtures/ts/4/test.ts | 16 ++++++++++++---- test/fixtures/ts/{6 => 5}/.swcrc | 0 test/fixtures/ts/5/package.json | 4 ++-- test/fixtures/ts/5/test.ts | 22 ++++++++++++---------- test/fixtures/ts/6/package.json | 6 ------ test/fixtures/ts/6/test.ts | 15 --------------- 17 files changed, 53 insertions(+), 91 deletions(-) rename test/fixtures/ts/{4 => 3}/.babelrc (100%) rename test/fixtures/ts/{4 => 3}/component.ts (100%) delete mode 100644 test/fixtures/ts/3/tsconfig.json rename test/fixtures/ts/{6 => 5}/.swcrc (100%) delete mode 100644 test/fixtures/ts/6/package.json delete mode 100644 test/fixtures/ts/6/test.ts diff --git a/README.md b/README.md index 2b9f289..ffde8b3 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,6 @@ Map file types to modules which provide a [require.extensions] loader. }, '.ts': [ 'ts-node/register', - 'typescript-register', 'typescript-require', 'sucrase/register/ts', { diff --git a/index.js b/index.js index 08e76bb..25f19db 100644 --- a/index.js +++ b/index.js @@ -219,7 +219,6 @@ var extensions = { }, '.ts': [ 'ts-node/register', - 'typescript-register', 'typescript-require', 'sucrase/register/ts', { diff --git a/test/fixtures/ts/1/package.json b/test/fixtures/ts/1/package.json index 4101654..1d30471 100644 --- a/test/fixtures/ts/1/package.json +++ b/test/fixtures/ts/1/package.json @@ -1,6 +1,5 @@ { "dependencies": { - "typescript": "1.4.1", - "typescript-register": "^1.1.0" + "typescript-require": "^0.2.10" } } diff --git a/test/fixtures/ts/2/package.json b/test/fixtures/ts/2/package.json index 1d30471..dc0534c 100644 --- a/test/fixtures/ts/2/package.json +++ b/test/fixtures/ts/2/package.json @@ -1,5 +1,5 @@ { "dependencies": { - "typescript-require": "^0.2.10" + "sucrase": "^3.12.1" } } diff --git a/test/fixtures/ts/2/test.ts b/test/fixtures/ts/2/test.ts index be06f12..46c3ac2 100644 --- a/test/fixtures/ts/2/test.ts +++ b/test/fixtures/ts/2/test.ts @@ -1,18 +1,24 @@ -var trueKey: boolean = true; -var falseKey: boolean = false; -var subProp: number = 1; - -var test = { +var test: { + data: { + trueKey: boolean, + falseKey: boolean, + subKey: { + subProp: number + } + } +} = { data: { - trueKey: trueKey, - falseKey: falseKey, + trueKey: true, + falseKey: false, subKey: { - subProp: subProp + subProp: 1 } } }; -var main = { +var main: { + default: typeof test +} = { default: test }; diff --git a/test/fixtures/ts/4/.babelrc b/test/fixtures/ts/3/.babelrc similarity index 100% rename from test/fixtures/ts/4/.babelrc rename to test/fixtures/ts/3/.babelrc diff --git a/test/fixtures/ts/4/component.ts b/test/fixtures/ts/3/component.ts similarity index 100% rename from test/fixtures/ts/4/component.ts rename to test/fixtures/ts/3/component.ts diff --git a/test/fixtures/ts/3/package.json b/test/fixtures/ts/3/package.json index dc0534c..5fa8c33 100644 --- a/test/fixtures/ts/3/package.json +++ b/test/fixtures/ts/3/package.json @@ -1,5 +1,9 @@ { "dependencies": { - "sucrase": "^3.12.1" + "@babel/core": "^7.2.2", + "@babel/preset-env": "^7.2.3", + "@babel/preset-react": "^7.0.0", + "@babel/preset-typescript": "^7.1.0", + "@babel/register": "^7.0.0" } } diff --git a/test/fixtures/ts/3/test.ts b/test/fixtures/ts/3/test.ts index 46c3ac2..5c3065b 100644 --- a/test/fixtures/ts/3/test.ts +++ b/test/fixtures/ts/3/test.ts @@ -1,25 +1,5 @@ -var test: { - data: { - trueKey: boolean, - falseKey: boolean, - subKey: { - subProp: number - } - } -} = { - data: { - trueKey: true, - falseKey: false, - subKey: { - subProp: 1 - } - } -}; +import Component from "./component" -var main: { - default: typeof test -} = { - default: test -}; +var test: typeof Component = { ...Component } -export = main; +export default test diff --git a/test/fixtures/ts/3/tsconfig.json b/test/fixtures/ts/3/tsconfig.json deleted file mode 100644 index ca687b6..0000000 --- a/test/fixtures/ts/3/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": false, - "noImplicitAny": false, - "removeComments": true, - "sourceMap": true, - "outDir": ".tmp" - } -} diff --git a/test/fixtures/ts/4/package.json b/test/fixtures/ts/4/package.json index 5fa8c33..b32c446 100644 --- a/test/fixtures/ts/4/package.json +++ b/test/fixtures/ts/4/package.json @@ -1,9 +1,6 @@ { "dependencies": { - "@babel/core": "^7.2.2", - "@babel/preset-env": "^7.2.3", - "@babel/preset-react": "^7.0.0", - "@babel/preset-typescript": "^7.1.0", - "@babel/register": "^7.0.0" + "esbuild": "^0.14.29", + "esbuild-register": "^3.3.2" } } diff --git a/test/fixtures/ts/4/test.ts b/test/fixtures/ts/4/test.ts index 5c3065b..5bd9e99 100644 --- a/test/fixtures/ts/4/test.ts +++ b/test/fixtures/ts/4/test.ts @@ -1,5 +1,13 @@ -import Component from "./component" +function add(x: number, y: number): number { + return x + y; +} -var test: typeof Component = { ...Component } - -export default test +export default { + data: { + trueKey: true as boolean, + falseKey: false as boolean, + subKey: { + subProp: add(0.5, 0.5), + }, + }, +}; diff --git a/test/fixtures/ts/6/.swcrc b/test/fixtures/ts/5/.swcrc similarity index 100% rename from test/fixtures/ts/6/.swcrc rename to test/fixtures/ts/5/.swcrc diff --git a/test/fixtures/ts/5/package.json b/test/fixtures/ts/5/package.json index b32c446..e345156 100644 --- a/test/fixtures/ts/5/package.json +++ b/test/fixtures/ts/5/package.json @@ -1,6 +1,6 @@ { "dependencies": { - "esbuild": "^0.14.29", - "esbuild-register": "^3.3.2" + "@swc/core": "^1.2.110", + "@swc/register": "^0.1.7" } } diff --git a/test/fixtures/ts/5/test.ts b/test/fixtures/ts/5/test.ts index 5bd9e99..9a955db 100644 --- a/test/fixtures/ts/5/test.ts +++ b/test/fixtures/ts/5/test.ts @@ -1,13 +1,15 @@ -function add(x: number, y: number): number { - return x + y; -} - -export default { +var test = { data: { - trueKey: true as boolean, - falseKey: false as boolean, + trueKey: true, + falseKey: false, subKey: { - subProp: add(0.5, 0.5), - }, - }, + subProp: 1 + } + } +}; + +var main = { + default: test }; + +export = main; diff --git a/test/fixtures/ts/6/package.json b/test/fixtures/ts/6/package.json deleted file mode 100644 index e345156..0000000 --- a/test/fixtures/ts/6/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "dependencies": { - "@swc/core": "^1.2.110", - "@swc/register": "^0.1.7" - } -} diff --git a/test/fixtures/ts/6/test.ts b/test/fixtures/ts/6/test.ts deleted file mode 100644 index 9a955db..0000000 --- a/test/fixtures/ts/6/test.ts +++ /dev/null @@ -1,15 +0,0 @@ -var test = { - data: { - trueKey: true, - falseKey: false, - subKey: { - subProp: 1 - } - } -}; - -var main = { - default: test -}; - -export = main; From 4ad723a953c96f15ff61f8ff131b3a7b35efe16a Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Wed, 6 Apr 2022 16:20:56 -0700 Subject: [PATCH 04/19] chore!: Remove unmaintained typescript-require hook --- README.md | 1 - index.js | 1 - test/fixtures/ts/1/package.json | 2 +- test/fixtures/ts/1/test.ts | 24 +++++++++++++++--------- test/fixtures/ts/{3 => 2}/.babelrc | 0 test/fixtures/ts/{3 => 2}/component.ts | 0 test/fixtures/ts/2/package.json | 6 +++++- test/fixtures/ts/2/test.ts | 26 +++----------------------- test/fixtures/ts/2/tsconfig.json | 11 ----------- test/fixtures/ts/3/package.json | 7 ++----- test/fixtures/ts/3/test.ts | 16 ++++++++++++---- test/fixtures/ts/{5 => 4}/.swcrc | 0 test/fixtures/ts/4/package.json | 4 ++-- test/fixtures/ts/4/test.ts | 22 ++++++++++++---------- test/fixtures/ts/5/package.json | 6 ------ test/fixtures/ts/5/test.ts | 15 --------------- test/index.js | 11 ++--------- 17 files changed, 54 insertions(+), 98 deletions(-) rename test/fixtures/ts/{3 => 2}/.babelrc (100%) rename test/fixtures/ts/{3 => 2}/component.ts (100%) delete mode 100644 test/fixtures/ts/2/tsconfig.json rename test/fixtures/ts/{5 => 4}/.swcrc (100%) delete mode 100644 test/fixtures/ts/5/package.json delete mode 100644 test/fixtures/ts/5/test.ts diff --git a/README.md b/README.md index ffde8b3..6b5eeac 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,6 @@ Map file types to modules which provide a [require.extensions] loader. }, '.ts': [ 'ts-node/register', - 'typescript-require', 'sucrase/register/ts', { module: '@babel/register', diff --git a/index.js b/index.js index 25f19db..eb14c78 100644 --- a/index.js +++ b/index.js @@ -219,7 +219,6 @@ var extensions = { }, '.ts': [ 'ts-node/register', - 'typescript-require', 'sucrase/register/ts', { module: '@babel/register', diff --git a/test/fixtures/ts/1/package.json b/test/fixtures/ts/1/package.json index 1d30471..dc0534c 100644 --- a/test/fixtures/ts/1/package.json +++ b/test/fixtures/ts/1/package.json @@ -1,5 +1,5 @@ { "dependencies": { - "typescript-require": "^0.2.10" + "sucrase": "^3.12.1" } } diff --git a/test/fixtures/ts/1/test.ts b/test/fixtures/ts/1/test.ts index be06f12..46c3ac2 100644 --- a/test/fixtures/ts/1/test.ts +++ b/test/fixtures/ts/1/test.ts @@ -1,18 +1,24 @@ -var trueKey: boolean = true; -var falseKey: boolean = false; -var subProp: number = 1; - -var test = { +var test: { + data: { + trueKey: boolean, + falseKey: boolean, + subKey: { + subProp: number + } + } +} = { data: { - trueKey: trueKey, - falseKey: falseKey, + trueKey: true, + falseKey: false, subKey: { - subProp: subProp + subProp: 1 } } }; -var main = { +var main: { + default: typeof test +} = { default: test }; diff --git a/test/fixtures/ts/3/.babelrc b/test/fixtures/ts/2/.babelrc similarity index 100% rename from test/fixtures/ts/3/.babelrc rename to test/fixtures/ts/2/.babelrc diff --git a/test/fixtures/ts/3/component.ts b/test/fixtures/ts/2/component.ts similarity index 100% rename from test/fixtures/ts/3/component.ts rename to test/fixtures/ts/2/component.ts diff --git a/test/fixtures/ts/2/package.json b/test/fixtures/ts/2/package.json index dc0534c..5fa8c33 100644 --- a/test/fixtures/ts/2/package.json +++ b/test/fixtures/ts/2/package.json @@ -1,5 +1,9 @@ { "dependencies": { - "sucrase": "^3.12.1" + "@babel/core": "^7.2.2", + "@babel/preset-env": "^7.2.3", + "@babel/preset-react": "^7.0.0", + "@babel/preset-typescript": "^7.1.0", + "@babel/register": "^7.0.0" } } diff --git a/test/fixtures/ts/2/test.ts b/test/fixtures/ts/2/test.ts index 46c3ac2..5c3065b 100644 --- a/test/fixtures/ts/2/test.ts +++ b/test/fixtures/ts/2/test.ts @@ -1,25 +1,5 @@ -var test: { - data: { - trueKey: boolean, - falseKey: boolean, - subKey: { - subProp: number - } - } -} = { - data: { - trueKey: true, - falseKey: false, - subKey: { - subProp: 1 - } - } -}; +import Component from "./component" -var main: { - default: typeof test -} = { - default: test -}; +var test: typeof Component = { ...Component } -export = main; +export default test diff --git a/test/fixtures/ts/2/tsconfig.json b/test/fixtures/ts/2/tsconfig.json deleted file mode 100644 index ca687b6..0000000 --- a/test/fixtures/ts/2/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": false, - "noImplicitAny": false, - "removeComments": true, - "sourceMap": true, - "outDir": ".tmp" - } -} diff --git a/test/fixtures/ts/3/package.json b/test/fixtures/ts/3/package.json index 5fa8c33..b32c446 100644 --- a/test/fixtures/ts/3/package.json +++ b/test/fixtures/ts/3/package.json @@ -1,9 +1,6 @@ { "dependencies": { - "@babel/core": "^7.2.2", - "@babel/preset-env": "^7.2.3", - "@babel/preset-react": "^7.0.0", - "@babel/preset-typescript": "^7.1.0", - "@babel/register": "^7.0.0" + "esbuild": "^0.14.29", + "esbuild-register": "^3.3.2" } } diff --git a/test/fixtures/ts/3/test.ts b/test/fixtures/ts/3/test.ts index 5c3065b..5bd9e99 100644 --- a/test/fixtures/ts/3/test.ts +++ b/test/fixtures/ts/3/test.ts @@ -1,5 +1,13 @@ -import Component from "./component" +function add(x: number, y: number): number { + return x + y; +} -var test: typeof Component = { ...Component } - -export default test +export default { + data: { + trueKey: true as boolean, + falseKey: false as boolean, + subKey: { + subProp: add(0.5, 0.5), + }, + }, +}; diff --git a/test/fixtures/ts/5/.swcrc b/test/fixtures/ts/4/.swcrc similarity index 100% rename from test/fixtures/ts/5/.swcrc rename to test/fixtures/ts/4/.swcrc diff --git a/test/fixtures/ts/4/package.json b/test/fixtures/ts/4/package.json index b32c446..e345156 100644 --- a/test/fixtures/ts/4/package.json +++ b/test/fixtures/ts/4/package.json @@ -1,6 +1,6 @@ { "dependencies": { - "esbuild": "^0.14.29", - "esbuild-register": "^3.3.2" + "@swc/core": "^1.2.110", + "@swc/register": "^0.1.7" } } diff --git a/test/fixtures/ts/4/test.ts b/test/fixtures/ts/4/test.ts index 5bd9e99..9a955db 100644 --- a/test/fixtures/ts/4/test.ts +++ b/test/fixtures/ts/4/test.ts @@ -1,13 +1,15 @@ -function add(x: number, y: number): number { - return x + y; -} - -export default { +var test = { data: { - trueKey: true as boolean, - falseKey: false as boolean, + trueKey: true, + falseKey: false, subKey: { - subProp: add(0.5, 0.5), - }, - }, + subProp: 1 + } + } +}; + +var main = { + default: test }; + +export = main; diff --git a/test/fixtures/ts/5/package.json b/test/fixtures/ts/5/package.json deleted file mode 100644 index e345156..0000000 --- a/test/fixtures/ts/5/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "dependencies": { - "@swc/core": "^1.2.110", - "@swc/register": "^0.1.7" - } -} diff --git a/test/fixtures/ts/5/test.ts b/test/fixtures/ts/5/test.ts deleted file mode 100644 index 9a955db..0000000 --- a/test/fixtures/ts/5/test.ts +++ /dev/null @@ -1,15 +0,0 @@ -var test = { - data: { - trueKey: true, - falseKey: false, - subKey: { - subProp: 1 - } - } -}; - -var main = { - default: test -}; - -export = main; diff --git a/test/index.js b/test/index.js index ce6f6fc..4675e48 100644 --- a/test/index.js +++ b/test/index.js @@ -62,9 +62,7 @@ var minVersions = { 'toml-require': { major: 6, minor: 0 }, }; -var maxVersions = { - 'typescript-require': { major: 10, minor: 0 }, -}; +var maxVersions = {}; describe('interpret.extensions', function() { @@ -173,12 +171,7 @@ describe('interpret.extensions', function() { }, }, }; - if (module === 'typescript-require') { - // This seems to cause an issue because they vm.runInNewContext so use .toMatch to compare - expect(require(fixture)).toMatch(expected); - } else { - expect(require(fixture)).toEqual(expected); - } + expect(require(fixture)).toEqual(expected); break; case '.csv': expected = [['r1c1','r1c2'], ['r2c1','r2c2']]; From 647d28f494ea90d4802e89909fd825da0a91e79a Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Wed, 6 Apr 2022 16:34:55 -0700 Subject: [PATCH 05/19] chore!: Replace legacy require-yaml with yaml-hook --- README.md | 4 ++-- index.js | 4 ++-- test/fixtures/yaml/0/package.json | 2 +- test/fixtures/yml/0/package.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6b5eeac..bc8ac38 100644 --- a/README.md +++ b/README.md @@ -180,8 +180,8 @@ Map file types to modules which provide a [require.extensions] loader. ], '.wisp': 'wisp/engine/node', '.xml': 'require-xml', - '.yaml': 'require-yaml', - '.yml': 'require-yaml', + '.yaml': 'yaml-hook/register', + '.yml': 'yaml-hook/register', } ``` diff --git a/index.js b/index.js index eb14c78..5582b05 100644 --- a/index.js +++ b/index.js @@ -291,8 +291,8 @@ var extensions = { ], '.wisp': 'wisp/engine/node', '.xml': 'require-xml', - '.yaml': 'require-yaml', - '.yml': 'require-yaml', + '.yaml': 'yaml-hook/register', + '.yml': 'yaml-hook/register', }; var jsVariantExtensions = [ diff --git a/test/fixtures/yaml/0/package.json b/test/fixtures/yaml/0/package.json index af6b878..b46af4b 100644 --- a/test/fixtures/yaml/0/package.json +++ b/test/fixtures/yaml/0/package.json @@ -1,5 +1,5 @@ { "dependencies": { - "require-yaml": "0.0.1" + "yaml-hook": "1.0.0" } } diff --git a/test/fixtures/yml/0/package.json b/test/fixtures/yml/0/package.json index af6b878..b46af4b 100644 --- a/test/fixtures/yml/0/package.json +++ b/test/fixtures/yml/0/package.json @@ -1,5 +1,5 @@ { "dependencies": { - "require-yaml": "0.0.1" + "yaml-hook": "1.0.0" } } From b75393f95296c20adf181efc0258c35e5382d912 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Wed, 6 Apr 2022 16:36:18 -0700 Subject: [PATCH 06/19] chore!: Remove legacy require-xml support --- README.md | 1 - index.js | 1 - test/fixtures/xml/0/package.json | 5 ----- test/fixtures/xml/0/test.xml | 5 ----- test/index.js | 13 ------------- 5 files changed, 25 deletions(-) delete mode 100644 test/fixtures/xml/0/package.json delete mode 100644 test/fixtures/xml/0/test.xml diff --git a/README.md b/README.md index bc8ac38..38ae749 100644 --- a/README.md +++ b/README.md @@ -179,7 +179,6 @@ Map file types to modules which provide a [require.extensions] loader. }, ], '.wisp': 'wisp/engine/node', - '.xml': 'require-xml', '.yaml': 'yaml-hook/register', '.yml': 'yaml-hook/register', } diff --git a/index.js b/index.js index 5582b05..48c5a77 100644 --- a/index.js +++ b/index.js @@ -290,7 +290,6 @@ var extensions = { }, ], '.wisp': 'wisp/engine/node', - '.xml': 'require-xml', '.yaml': 'yaml-hook/register', '.yml': 'yaml-hook/register', }; diff --git a/test/fixtures/xml/0/package.json b/test/fixtures/xml/0/package.json deleted file mode 100644 index c67ec65..0000000 --- a/test/fixtures/xml/0/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "require-xml": "0.0.1" - } -} diff --git a/test/fixtures/xml/0/test.xml b/test/fixtures/xml/0/test.xml deleted file mode 100644 index 17c40d1..0000000 --- a/test/fixtures/xml/0/test.xml +++ /dev/null @@ -1,5 +0,0 @@ - - true - false - - diff --git a/test/index.js b/test/index.js index 4675e48..6131f98 100644 --- a/test/index.js +++ b/test/index.js @@ -58,7 +58,6 @@ var minVersions = { sucrase: { major: 8, minor: 0 }, 'ts-node': { major: 4, minor: 0 }, wisp: { major: 0, minor: 12 }, - 'require-xml': { major: 6, minor: 0 }, 'toml-require': { major: 6, minor: 0 }, }; @@ -189,18 +188,6 @@ describe('interpret.extensions', function() { }; expect(require(fixture)).toEqual(expected); break; - case '.xml': - expected = { - data: { - trueKey: 'true', - falseKey: 'false', - subKey: { - subProp: '1', - }, - }, - }; - expect(require(fixture)).toEqual(JSON.stringify(expected)); - break; case '.toml': expected = Object.create(null); From 9d2cd934c5f3e45f12a1c3a19de6cc6b5e88bc83 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Wed, 6 Apr 2022 16:43:11 -0700 Subject: [PATCH 07/19] chore!: Remove legacy/deprecated babel hooks --- README.md | 94 +++++------------------- index.js | 99 +++++--------------------- test/fixtures/babel.js/1/.babelrc | 3 - test/fixtures/babel.js/1/package.json | 6 -- test/fixtures/babel.js/1/test.babel.js | 10 --- test/fixtures/babel.js/2/.babelrc | 3 - test/fixtures/babel.js/2/package.json | 6 -- test/fixtures/babel.js/2/test.babel.js | 10 --- test/fixtures/babel.js/3/package.json | 5 -- test/fixtures/babel.js/3/test.babel.js | 10 --- test/fixtures/jsx/1/.babelrc | 3 - test/fixtures/jsx/1/package.json | 7 -- test/fixtures/jsx/1/test.jsx | 17 ----- test/fixtures/jsx/2/.babelrc | 3 - test/fixtures/jsx/2/package.json | 7 -- test/fixtures/jsx/2/test.jsx | 17 ----- test/fixtures/jsx/3/package.json | 5 -- test/fixtures/jsx/3/test.jsx | 17 ----- 18 files changed, 36 insertions(+), 286 deletions(-) delete mode 100644 test/fixtures/babel.js/1/.babelrc delete mode 100644 test/fixtures/babel.js/1/package.json delete mode 100644 test/fixtures/babel.js/1/test.babel.js delete mode 100644 test/fixtures/babel.js/2/.babelrc delete mode 100644 test/fixtures/babel.js/2/package.json delete mode 100644 test/fixtures/babel.js/2/test.babel.js delete mode 100644 test/fixtures/babel.js/3/package.json delete mode 100644 test/fixtures/babel.js/3/test.babel.js delete mode 100644 test/fixtures/jsx/1/.babelrc delete mode 100644 test/fixtures/jsx/1/package.json delete mode 100644 test/fixtures/jsx/1/test.jsx delete mode 100644 test/fixtures/jsx/2/.babelrc delete mode 100644 test/fixtures/jsx/2/package.json delete mode 100644 test/fixtures/jsx/2/test.jsx delete mode 100644 test/fixtures/jsx/3/package.json delete mode 100644 test/fixtures/jsx/3/test.jsx diff --git a/README.md b/README.md index 38ae749..a0a5d7d 100644 --- a/README.md +++ b/README.md @@ -26,45 +26,16 @@ Map file types to modules which provide a [require.extensions] loader. ```js { - '.babel.js': [ - { - module: '@babel/register', - register: function(hook) { - hook({ - extensions: '.js', - rootMode: 'upward-optional', - ignore: [ignoreNonBabelAndNodeModules], - }); - }, - }, - { - module: 'babel-register', - register: function(hook) { - hook({ - extensions: '.js', - ignore: ignoreNonBabelAndNodeModules, - }); - }, - }, - { - module: 'babel-core/register', - register: function(hook) { - hook({ - extensions: '.js', - ignore: ignoreNonBabelAndNodeModules, - }); - }, - }, - { - module: 'babel/register', - register: function(hook) { - hook({ - extensions: '.js', - ignore: ignoreNonBabelAndNodeModules, - }); - }, + '.babel.js': { + module: '@babel/register', + register: function(hook) { + hook({ + extensions: '.js', + rootMode: 'upward-optional', + ignore: [ignoreNonBabelAndNodeModules], + }); }, - ], + }, '.babel.ts': [ { module: '@babel/register', @@ -100,45 +71,16 @@ Map file types to modules which provide a [require.extensions] loader. '.js': null, '.json': null, '.json5': ['json5/lib/register', 'json5/lib/require'], - '.jsx': [ - { - module: '@babel/register', - register: function(hook) { - hook({ - extensions: '.jsx', - rootMode: 'upward-optional', - ignore: [ignoreNonBabelAndNodeModules], - }); - }, - }, - { - module: 'babel-register', - register: function(hook) { - hook({ - extensions: '.jsx', - ignore: ignoreNonBabelAndNodeModules, - }); - }, - }, - { - module: 'babel-core/register', - register: function(hook) { - hook({ - extensions: '.jsx', - ignore: ignoreNonBabelAndNodeModules, - }); - }, - }, - { - module: 'babel/register', - register: function(hook) { - hook({ - extensions: '.jsx', - ignore: ignoreNonBabelAndNodeModules, - }); - }, + '.jsx': { + module: '@babel/register', + register: function(hook) { + hook({ + extensions: '.jsx', + rootMode: 'upward-optional', + ignore: [ignoreNonBabelAndNodeModules], + }); }, - ], + }, '.litcoffee': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], '.liticed': 'iced-coffee-script/register', '.ls': ['livescript', 'LiveScript'], diff --git a/index.js b/index.js index 48c5a77..946ac50 100644 --- a/index.js +++ b/index.js @@ -14,56 +14,22 @@ var endsInEsbuildTsx = /\.esbuild\.tsx$/; var mjsStub = path.join(__dirname, 'mjs-stub'); -function ignoreNonBabelAndNodeModules(file) { - return !endsInBabelJs.test(file) && - path.relative(process.cwd(), file).split(path.sep).indexOf('node_modules') >= 0; -} - // Not part of the above check because it seems broken function isNodeModules(file) { return path.relative(process.cwd(), file).split(path.sep).indexOf('node_modules') >= 0; } var extensions = { - '.babel.js': [ - { - module: '@babel/register', - register: function(hook) { - hook({ - extensions: '.js', - rootMode: 'upward-optional', - overrides: [{ only: [endsInBabelJs] }], - }); - }, - }, - { - module: 'babel-register', - register: function(hook) { - hook({ - extensions: '.js', - ignore: ignoreNonBabelAndNodeModules, - }); - }, - }, - { - module: 'babel-core/register', - register: function(hook) { - hook({ - extensions: '.js', - ignore: ignoreNonBabelAndNodeModules, - }); - }, - }, - { - module: 'babel/register', - register: function(hook) { - hook({ - extensions: '.js', - ignore: ignoreNonBabelAndNodeModules, - }); - }, + '.babel.js': { + module: '@babel/register', + register: function(hook) { + hook({ + extensions: '.js', + rootMode: 'upward-optional', + overrides: [{ only: [endsInBabelJs] }], + }); }, - ], + }, '.babel.jsx': { module: '@babel/register', register: function(hook) { @@ -167,45 +133,16 @@ var extensions = { '.js': null, '.json': null, '.json5': ['json5/lib/register', 'json5/lib/require'], - '.jsx': [ - { - module: '@babel/register', - register: function(hook) { - hook({ - extensions: '.jsx', - rootMode: 'upward-optional', - overrides: [{ only: [endsInJsx] }], - }); - }, - }, - { - module: 'babel-register', - register: function(hook) { - hook({ - extensions: '.jsx', - ignore: ignoreNonBabelAndNodeModules, - }); - }, - }, - { - module: 'babel-core/register', - register: function(hook) { - hook({ - extensions: '.jsx', - ignore: ignoreNonBabelAndNodeModules, - }); - }, - }, - { - module: 'babel/register', - register: function(hook) { - hook({ - extensions: '.jsx', - ignore: ignoreNonBabelAndNodeModules, - }); - }, + '.jsx': { + module: '@babel/register', + register: function(hook) { + hook({ + extensions: '.jsx', + rootMode: 'upward-optional', + overrides: [{ only: [endsInJsx] }], + }); }, - ], + }, '.litcoffee': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], '.liticed': 'iced-coffee-script/register', '.ls': ['livescript', 'LiveScript'], diff --git a/test/fixtures/babel.js/1/.babelrc b/test/fixtures/babel.js/1/.babelrc deleted file mode 100644 index c13c5f6..0000000 --- a/test/fixtures/babel.js/1/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["es2015"] -} diff --git a/test/fixtures/babel.js/1/package.json b/test/fixtures/babel.js/1/package.json deleted file mode 100644 index c35f68d..0000000 --- a/test/fixtures/babel.js/1/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "dependencies": { - "babel-preset-es2015": "^6.24.1", - "babel-register": "^6.26.0" - } -} diff --git a/test/fixtures/babel.js/1/test.babel.js b/test/fixtures/babel.js/1/test.babel.js deleted file mode 100644 index e929c98..0000000 --- a/test/fixtures/babel.js/1/test.babel.js +++ /dev/null @@ -1,10 +0,0 @@ -// Test ES6 arrow functions -var fn = () => { - var trueKey = true; - var falseKey = false; - var subKey = { subProp: 1 }; - // Test harmony object short notation - return { data: { trueKey, falseKey, subKey}}; -}; - -module.exports = fn(); diff --git a/test/fixtures/babel.js/2/.babelrc b/test/fixtures/babel.js/2/.babelrc deleted file mode 100644 index c13c5f6..0000000 --- a/test/fixtures/babel.js/2/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["es2015"] -} diff --git a/test/fixtures/babel.js/2/package.json b/test/fixtures/babel.js/2/package.json deleted file mode 100644 index c920682..0000000 --- a/test/fixtures/babel.js/2/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "dependencies": { - "babel-core": "^6.26.3", - "babel-preset-es2015": "^6.24.1" - } -} diff --git a/test/fixtures/babel.js/2/test.babel.js b/test/fixtures/babel.js/2/test.babel.js deleted file mode 100644 index e929c98..0000000 --- a/test/fixtures/babel.js/2/test.babel.js +++ /dev/null @@ -1,10 +0,0 @@ -// Test ES6 arrow functions -var fn = () => { - var trueKey = true; - var falseKey = false; - var subKey = { subProp: 1 }; - // Test harmony object short notation - return { data: { trueKey, falseKey, subKey}}; -}; - -module.exports = fn(); diff --git a/test/fixtures/babel.js/3/package.json b/test/fixtures/babel.js/3/package.json deleted file mode 100644 index c5afc56..0000000 --- a/test/fixtures/babel.js/3/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "babel": "^5.8.38" - } -} diff --git a/test/fixtures/babel.js/3/test.babel.js b/test/fixtures/babel.js/3/test.babel.js deleted file mode 100644 index e929c98..0000000 --- a/test/fixtures/babel.js/3/test.babel.js +++ /dev/null @@ -1,10 +0,0 @@ -// Test ES6 arrow functions -var fn = () => { - var trueKey = true; - var falseKey = false; - var subKey = { subProp: 1 }; - // Test harmony object short notation - return { data: { trueKey, falseKey, subKey}}; -}; - -module.exports = fn(); diff --git a/test/fixtures/jsx/1/.babelrc b/test/fixtures/jsx/1/.babelrc deleted file mode 100644 index 86c445f..0000000 --- a/test/fixtures/jsx/1/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["es2015", "react"] -} diff --git a/test/fixtures/jsx/1/package.json b/test/fixtures/jsx/1/package.json deleted file mode 100644 index 5c1212f..0000000 --- a/test/fixtures/jsx/1/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "dependencies": { - "babel-preset-es2015": "^6.24.1", - "babel-preset-react": "^6.24.1", - "babel-register": "^6.26.0" - } -} diff --git a/test/fixtures/jsx/1/test.jsx b/test/fixtures/jsx/1/test.jsx deleted file mode 100644 index acfb81c..0000000 --- a/test/fixtures/jsx/1/test.jsx +++ /dev/null @@ -1,17 +0,0 @@ -const React = { - createElement: function(Component){ - return Component(); - } -}; - -// Test harmony arrow functions -const Component = () => { - var trueKey = true; - var falseKey = false; - var subKey = { subProp: 1 }; - // Test harmony object short notation - return { data: { trueKey, falseKey, subKey}}; -}; - -// Test JSX syntax -module.exports = ; diff --git a/test/fixtures/jsx/2/.babelrc b/test/fixtures/jsx/2/.babelrc deleted file mode 100644 index 86c445f..0000000 --- a/test/fixtures/jsx/2/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["es2015", "react"] -} diff --git a/test/fixtures/jsx/2/package.json b/test/fixtures/jsx/2/package.json deleted file mode 100644 index 11c4070..0000000 --- a/test/fixtures/jsx/2/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "dependencies": { - "babel-core": "^6.26.3", - "babel-preset-es2015": "^6.24.1", - "babel-preset-react": "^6.24.1" - } -} diff --git a/test/fixtures/jsx/2/test.jsx b/test/fixtures/jsx/2/test.jsx deleted file mode 100644 index acfb81c..0000000 --- a/test/fixtures/jsx/2/test.jsx +++ /dev/null @@ -1,17 +0,0 @@ -const React = { - createElement: function(Component){ - return Component(); - } -}; - -// Test harmony arrow functions -const Component = () => { - var trueKey = true; - var falseKey = false; - var subKey = { subProp: 1 }; - // Test harmony object short notation - return { data: { trueKey, falseKey, subKey}}; -}; - -// Test JSX syntax -module.exports = ; diff --git a/test/fixtures/jsx/3/package.json b/test/fixtures/jsx/3/package.json deleted file mode 100644 index c5afc56..0000000 --- a/test/fixtures/jsx/3/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "babel": "^5.8.38" - } -} diff --git a/test/fixtures/jsx/3/test.jsx b/test/fixtures/jsx/3/test.jsx deleted file mode 100644 index acfb81c..0000000 --- a/test/fixtures/jsx/3/test.jsx +++ /dev/null @@ -1,17 +0,0 @@ -const React = { - createElement: function(Component){ - return Component(); - } -}; - -// Test harmony arrow functions -const Component = () => { - var trueKey = true; - var falseKey = false; - var subKey = { subProp: 1 }; - // Test harmony object short notation - return { data: { trueKey, falseKey, subKey}}; -}; - -// Test JSX syntax -module.exports = ; From 0342ac0cb4bbc34f4bc86c4642e1eca646961c20 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Wed, 6 Apr 2022 16:44:37 -0700 Subject: [PATCH 08/19] chore!: Remove legacy buble support --- README.md | 1 - index.js | 2 -- test/fixtures/buble.js/0/package.json | 5 ----- test/fixtures/buble.js/0/test.buble.js | 10 ---------- test/index.js | 1 - 5 files changed, 19 deletions(-) delete mode 100644 test/fixtures/buble.js/0/package.json delete mode 100644 test/fixtures/buble.js/0/test.buble.js diff --git a/README.md b/README.md index a0a5d7d..59a1ffd 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,6 @@ Map file types to modules which provide a [require.extensions] loader. }, }, ], - '.buble.js': 'buble/register', '.cirru': 'cirru-script/lib/register', '.cjsx': 'node-cjsx/register', '.co': 'coco', diff --git a/index.js b/index.js index 946ac50..bdd730a 100644 --- a/index.js +++ b/index.js @@ -62,7 +62,6 @@ var extensions = { }); }, }, - '.buble.js': 'buble/register', '.cirru': 'cirru-script/lib/register', '.cjsx': 'node-cjsx/register', '.co': 'coco', @@ -241,7 +240,6 @@ var jsVariantExtensions = [ '.esbuild.jsx', '.esbuild.ts', '.esbuild.tsx', - '.buble.js', '.cirru', '.cjsx', '.co', diff --git a/test/fixtures/buble.js/0/package.json b/test/fixtures/buble.js/0/package.json deleted file mode 100644 index f51ab68..0000000 --- a/test/fixtures/buble.js/0/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "buble": "^0.19.6" - } -} diff --git a/test/fixtures/buble.js/0/test.buble.js b/test/fixtures/buble.js/0/test.buble.js deleted file mode 100644 index e929c98..0000000 --- a/test/fixtures/buble.js/0/test.buble.js +++ /dev/null @@ -1,10 +0,0 @@ -// Test ES6 arrow functions -var fn = () => { - var trueKey = true; - var falseKey = false; - var subKey = { subProp: 1 }; - // Test harmony object short notation - return { data: { trueKey, falseKey, subKey}}; -}; - -module.exports = fn(); diff --git a/test/index.js b/test/index.js index 6131f98..9e3e82a 100644 --- a/test/index.js +++ b/test/index.js @@ -50,7 +50,6 @@ function cleanup() { // These modules need newer node features var minVersions = { '@babel/register': { major: 6, minor: 0 }, - buble: { major: 4, minor: 0 }, coffeescript: { major: 6, minor: 0 }, earlgrey: { major: 0, minor: 12 }, esm: { major: 6, minor: 0 }, From 6c60e685b5935191f24dcb21a283bd2cc854a567 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Wed, 6 Apr 2022 16:47:18 -0700 Subject: [PATCH 09/19] chore!: Remove legacy cirru-script support --- README.md | 1 - index.js | 2 -- package.json | 1 - test/fixtures/cirru/0/package.json | 6 ------ test/fixtures/cirru/0/test.cirru | 6 ------ 5 files changed, 16 deletions(-) delete mode 100644 test/fixtures/cirru/0/package.json delete mode 100644 test/fixtures/cirru/0/test.cirru diff --git a/README.md b/README.md index 59a1ffd..d9d0cc3 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,6 @@ Map file types to modules which provide a [require.extensions] loader. }, }, ], - '.cirru': 'cirru-script/lib/register', '.cjsx': 'node-cjsx/register', '.co': 'coco', '.coffee': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], diff --git a/index.js b/index.js index bdd730a..47b9a47 100644 --- a/index.js +++ b/index.js @@ -62,7 +62,6 @@ var extensions = { }); }, }, - '.cirru': 'cirru-script/lib/register', '.cjsx': 'node-cjsx/register', '.co': 'coco', '.coffee': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], @@ -240,7 +239,6 @@ var jsVariantExtensions = [ '.esbuild.jsx', '.esbuild.ts', '.esbuild.tsx', - '.cirru', '.cjsx', '.co', '.coffee', diff --git a/package.json b/package.json index cc05601..829c126 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,6 @@ "trash-cli": "^3.0.0" }, "keywords": [ - "cirru-script", "cjsx", "co", "coco", diff --git a/test/fixtures/cirru/0/package.json b/test/fixtures/cirru/0/package.json deleted file mode 100644 index d417462..0000000 --- a/test/fixtures/cirru/0/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "dependencies": { - "babel-preset-es2015": "^6.24.1", - "cirru-script": "^0.5.5" - } -} diff --git a/test/fixtures/cirru/0/test.cirru b/test/fixtures/cirru/0/test.cirru deleted file mode 100644 index 7b18209..0000000 --- a/test/fixtures/cirru/0/test.cirru +++ /dev/null @@ -1,6 +0,0 @@ -= module.exports $ object - :data $ object - :falseKey false - :subKey $ object - :subProp 1 - :trueKey true From fe7e7bb29a6801cc4a74e898cd834a615a61618e Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Wed, 6 Apr 2022 16:50:07 -0700 Subject: [PATCH 10/19] chore!: Remove legacy node-cjsx support --- README.md | 1 - index.js | 2 -- package.json | 1 - test/fixtures/cjsx/0/package.json | 5 ----- test/fixtures/cjsx/0/test.cjsx | 15 --------------- 5 files changed, 24 deletions(-) delete mode 100644 test/fixtures/cjsx/0/package.json delete mode 100644 test/fixtures/cjsx/0/test.cjsx diff --git a/README.md b/README.md index d9d0cc3..877e8d0 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,6 @@ Map file types to modules which provide a [require.extensions] loader. }, }, ], - '.cjsx': 'node-cjsx/register', '.co': 'coco', '.coffee': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], '.coffee.md': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], diff --git a/index.js b/index.js index 47b9a47..b71a2a6 100644 --- a/index.js +++ b/index.js @@ -62,7 +62,6 @@ var extensions = { }); }, }, - '.cjsx': 'node-cjsx/register', '.co': 'coco', '.coffee': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], '.coffee.md': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], @@ -239,7 +238,6 @@ var jsVariantExtensions = [ '.esbuild.jsx', '.esbuild.ts', '.esbuild.tsx', - '.cjsx', '.co', '.coffee', '.coffee.md', diff --git a/package.json b/package.json index 829c126..c84aae4 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,6 @@ "trash-cli": "^3.0.0" }, "keywords": [ - "cjsx", "co", "coco", "coffee", diff --git a/test/fixtures/cjsx/0/package.json b/test/fixtures/cjsx/0/package.json deleted file mode 100644 index e78a54f..0000000 --- a/test/fixtures/cjsx/0/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "node-cjsx": "^2.0.0" - } -} diff --git a/test/fixtures/cjsx/0/test.cjsx b/test/fixtures/cjsx/0/test.cjsx deleted file mode 100644 index 2713542..0000000 --- a/test/fixtures/cjsx/0/test.cjsx +++ /dev/null @@ -1,15 +0,0 @@ -React = createElement: (Component) -> - Component() -# Test harmony arrow functions - -Component = -> - trueKey = true - falseKey = false - subKey = subProp: 1 - # Test harmony object short notation - { data: - trueKey: trueKey - falseKey: falseKey - subKey: subKey } - -module.exports = From 9a204019e1d8ebc30fa8f07b8a9bef320a837312 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Wed, 6 Apr 2022 16:51:55 -0700 Subject: [PATCH 11/19] chore!: Remove legacy coco support --- README.md | 1 - index.js | 2 -- package.json | 2 -- test/fixtures/co/0/package.json | 5 ----- test/fixtures/co/0/test.co | 9 --------- 5 files changed, 19 deletions(-) delete mode 100644 test/fixtures/co/0/package.json delete mode 100644 test/fixtures/co/0/test.co diff --git a/README.md b/README.md index 877e8d0..e859047 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,6 @@ Map file types to modules which provide a [require.extensions] loader. }, }, ], - '.co': 'coco', '.coffee': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], '.coffee.md': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], '.csv': 'require-csv', diff --git a/index.js b/index.js index b71a2a6..6fd5aa7 100644 --- a/index.js +++ b/index.js @@ -62,7 +62,6 @@ var extensions = { }); }, }, - '.co': 'coco', '.coffee': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], '.coffee.md': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], '.csv': 'require-csv', @@ -238,7 +237,6 @@ var jsVariantExtensions = [ '.esbuild.jsx', '.esbuild.ts', '.esbuild.tsx', - '.co', '.coffee', '.coffee.md', '.eg', diff --git a/package.json b/package.json index c84aae4..1da19d1 100644 --- a/package.json +++ b/package.json @@ -39,8 +39,6 @@ "trash-cli": "^3.0.0" }, "keywords": [ - "co", - "coco", "coffee", "coffee-script", "coffee.md", diff --git a/test/fixtures/co/0/package.json b/test/fixtures/co/0/package.json deleted file mode 100644 index 2680465..0000000 --- a/test/fixtures/co/0/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "coco": "^0.9.1" - } -} diff --git a/test/fixtures/co/0/test.co b/test/fixtures/co/0/test.co deleted file mode 100644 index 12f6fcd..0000000 --- a/test/fixtures/co/0/test.co +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = { - data: { - trueKey: true - falseKey: false - subKey: { - subProp: 1 - } - } -} From b2a24aa6bb473cb7dcbb384d5bd7de073c3b9574 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Wed, 6 Apr 2022 16:59:06 -0700 Subject: [PATCH 12/19] chore!: Remove legacy/deprecated coffeescript hooks --- README.md | 6 +++--- index.js | 6 +++--- package.json | 1 - test/fixtures/coffee.md/1/package.json | 5 ----- test/fixtures/coffee.md/1/test.coffee.md | 10 ---------- test/fixtures/coffee.md/2/package.json | 5 ----- test/fixtures/coffee.md/2/test.coffee.md | 10 ---------- test/fixtures/coffee.md/3/package.json | 5 ----- test/fixtures/coffee.md/3/test.coffee.md | 10 ---------- test/fixtures/coffee/1/package.json | 5 ----- test/fixtures/coffee/1/test.coffee | 6 ------ test/fixtures/coffee/2/package.json | 5 ----- test/fixtures/coffee/2/test.coffee | 6 ------ test/fixtures/coffee/3/package.json | 5 ----- test/fixtures/coffee/3/test.coffee | 6 ------ test/fixtures/litcoffee/1/package.json | 5 ----- test/fixtures/litcoffee/1/test.litcoffee | 8 -------- test/fixtures/litcoffee/2/package.json | 5 ----- test/fixtures/litcoffee/2/test.litcoffee | 8 -------- test/fixtures/litcoffee/3/package.json | 5 ----- test/fixtures/litcoffee/3/test.litcoffee | 8 -------- 21 files changed, 6 insertions(+), 124 deletions(-) delete mode 100644 test/fixtures/coffee.md/1/package.json delete mode 100644 test/fixtures/coffee.md/1/test.coffee.md delete mode 100644 test/fixtures/coffee.md/2/package.json delete mode 100644 test/fixtures/coffee.md/2/test.coffee.md delete mode 100644 test/fixtures/coffee.md/3/package.json delete mode 100644 test/fixtures/coffee.md/3/test.coffee.md delete mode 100644 test/fixtures/coffee/1/package.json delete mode 100644 test/fixtures/coffee/1/test.coffee delete mode 100644 test/fixtures/coffee/2/package.json delete mode 100644 test/fixtures/coffee/2/test.coffee delete mode 100644 test/fixtures/coffee/3/package.json delete mode 100644 test/fixtures/coffee/3/test.coffee delete mode 100644 test/fixtures/litcoffee/1/package.json delete mode 100644 test/fixtures/litcoffee/1/test.litcoffee delete mode 100644 test/fixtures/litcoffee/2/package.json delete mode 100644 test/fixtures/litcoffee/2/test.litcoffee delete mode 100644 test/fixtures/litcoffee/3/package.json delete mode 100644 test/fixtures/litcoffee/3/test.litcoffee diff --git a/README.md b/README.md index e859047..367d0ca 100644 --- a/README.md +++ b/README.md @@ -48,8 +48,8 @@ Map file types to modules which provide a [require.extensions] loader. }, }, ], - '.coffee': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], - '.coffee.md': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], + '.coffee': 'coffeescript/register', + '.coffee.md': 'coffeescript/register', '.csv': 'require-csv', '.eg': 'earlgrey/register', '.esm.js': { @@ -77,7 +77,7 @@ Map file types to modules which provide a [require.extensions] loader. }); }, }, - '.litcoffee': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], + '.litcoffee': 'coffeescript/register', '.liticed': 'iced-coffee-script/register', '.ls': ['livescript', 'LiveScript'], '.mjs': '/absolute/path/to/interpret/mjs-stub.js', diff --git a/index.js b/index.js index 6fd5aa7..ec21f8a 100644 --- a/index.js +++ b/index.js @@ -62,8 +62,8 @@ var extensions = { }); }, }, - '.coffee': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], - '.coffee.md': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], + '.coffee': 'coffeescript/register', + '.coffee.md': 'coffeescript/register', '.csv': 'require-csv', '.eg': 'earlgrey/register', '.esbuild.js': { @@ -139,7 +139,7 @@ var extensions = { }); }, }, - '.litcoffee': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], + '.litcoffee': 'coffeescript/register', '.liticed': 'iced-coffee-script/register', '.ls': ['livescript', 'LiveScript'], '.mjs': mjsStub, diff --git a/package.json b/package.json index 1da19d1..e94c69d 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,6 @@ }, "keywords": [ "coffee", - "coffee-script", "coffee.md", "coffeescript", "csv", diff --git a/test/fixtures/coffee.md/1/package.json b/test/fixtures/coffee.md/1/package.json deleted file mode 100644 index 538ad86..0000000 --- a/test/fixtures/coffee.md/1/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "coffee-script": "^1.12.7" - } -} diff --git a/test/fixtures/coffee.md/1/test.coffee.md b/test/fixtures/coffee.md/1/test.coffee.md deleted file mode 100644 index 42ada56..0000000 --- a/test/fixtures/coffee.md/1/test.coffee.md +++ /dev/null @@ -1,10 +0,0 @@ -Test Fixture -============ - - module.exports = - data: - trueKey: true - falseKey: false - subKey: - subProp: 1 - diff --git a/test/fixtures/coffee.md/2/package.json b/test/fixtures/coffee.md/2/package.json deleted file mode 100644 index 1a44d02..0000000 --- a/test/fixtures/coffee.md/2/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "coffeescript": "^2.3.2" - } -} diff --git a/test/fixtures/coffee.md/2/test.coffee.md b/test/fixtures/coffee.md/2/test.coffee.md deleted file mode 100644 index 42ada56..0000000 --- a/test/fixtures/coffee.md/2/test.coffee.md +++ /dev/null @@ -1,10 +0,0 @@ -Test Fixture -============ - - module.exports = - data: - trueKey: true - falseKey: false - subKey: - subProp: 1 - diff --git a/test/fixtures/coffee.md/3/package.json b/test/fixtures/coffee.md/3/package.json deleted file mode 100644 index 538ad86..0000000 --- a/test/fixtures/coffee.md/3/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "coffee-script": "^1.12.7" - } -} diff --git a/test/fixtures/coffee.md/3/test.coffee.md b/test/fixtures/coffee.md/3/test.coffee.md deleted file mode 100644 index 42ada56..0000000 --- a/test/fixtures/coffee.md/3/test.coffee.md +++ /dev/null @@ -1,10 +0,0 @@ -Test Fixture -============ - - module.exports = - data: - trueKey: true - falseKey: false - subKey: - subProp: 1 - diff --git a/test/fixtures/coffee/1/package.json b/test/fixtures/coffee/1/package.json deleted file mode 100644 index 538ad86..0000000 --- a/test/fixtures/coffee/1/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "coffee-script": "^1.12.7" - } -} diff --git a/test/fixtures/coffee/1/test.coffee b/test/fixtures/coffee/1/test.coffee deleted file mode 100644 index 61d3b46..0000000 --- a/test/fixtures/coffee/1/test.coffee +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = - data: - trueKey: true - falseKey: false - subKey: - subProp: 1 diff --git a/test/fixtures/coffee/2/package.json b/test/fixtures/coffee/2/package.json deleted file mode 100644 index 1a44d02..0000000 --- a/test/fixtures/coffee/2/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "coffeescript": "^2.3.2" - } -} diff --git a/test/fixtures/coffee/2/test.coffee b/test/fixtures/coffee/2/test.coffee deleted file mode 100644 index 61d3b46..0000000 --- a/test/fixtures/coffee/2/test.coffee +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = - data: - trueKey: true - falseKey: false - subKey: - subProp: 1 diff --git a/test/fixtures/coffee/3/package.json b/test/fixtures/coffee/3/package.json deleted file mode 100644 index 538ad86..0000000 --- a/test/fixtures/coffee/3/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "coffee-script": "^1.12.7" - } -} diff --git a/test/fixtures/coffee/3/test.coffee b/test/fixtures/coffee/3/test.coffee deleted file mode 100644 index 61d3b46..0000000 --- a/test/fixtures/coffee/3/test.coffee +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = - data: - trueKey: true - falseKey: false - subKey: - subProp: 1 diff --git a/test/fixtures/litcoffee/1/package.json b/test/fixtures/litcoffee/1/package.json deleted file mode 100644 index 538ad86..0000000 --- a/test/fixtures/litcoffee/1/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "coffee-script": "^1.12.7" - } -} diff --git a/test/fixtures/litcoffee/1/test.litcoffee b/test/fixtures/litcoffee/1/test.litcoffee deleted file mode 100644 index 297d23f..0000000 --- a/test/fixtures/litcoffee/1/test.litcoffee +++ /dev/null @@ -1,8 +0,0 @@ -# comment - - module.exports = - data: - trueKey: true - falseKey: false - subKey: - subProp: 1 diff --git a/test/fixtures/litcoffee/2/package.json b/test/fixtures/litcoffee/2/package.json deleted file mode 100644 index 1a44d02..0000000 --- a/test/fixtures/litcoffee/2/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "coffeescript": "^2.3.2" - } -} diff --git a/test/fixtures/litcoffee/2/test.litcoffee b/test/fixtures/litcoffee/2/test.litcoffee deleted file mode 100644 index 297d23f..0000000 --- a/test/fixtures/litcoffee/2/test.litcoffee +++ /dev/null @@ -1,8 +0,0 @@ -# comment - - module.exports = - data: - trueKey: true - falseKey: false - subKey: - subProp: 1 diff --git a/test/fixtures/litcoffee/3/package.json b/test/fixtures/litcoffee/3/package.json deleted file mode 100644 index 538ad86..0000000 --- a/test/fixtures/litcoffee/3/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "coffee-script": "^1.12.7" - } -} diff --git a/test/fixtures/litcoffee/3/test.litcoffee b/test/fixtures/litcoffee/3/test.litcoffee deleted file mode 100644 index 297d23f..0000000 --- a/test/fixtures/litcoffee/3/test.litcoffee +++ /dev/null @@ -1,8 +0,0 @@ -# comment - - module.exports = - data: - trueKey: true - falseKey: false - subKey: - subProp: 1 From 564311a124b54d4779af44faf4f69f883495d15c Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Wed, 6 Apr 2022 17:00:16 -0700 Subject: [PATCH 13/19] chore!: Remove legacy require-csv support --- README.md | 1 - index.js | 1 - package.json | 1 - test/fixtures/csv/0/package.json | 5 ----- test/fixtures/csv/0/test.csv | 2 -- test/index.js | 4 ---- 6 files changed, 14 deletions(-) delete mode 100644 test/fixtures/csv/0/package.json delete mode 100644 test/fixtures/csv/0/test.csv diff --git a/README.md b/README.md index 367d0ca..506a8c1 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,6 @@ Map file types to modules which provide a [require.extensions] loader. ], '.coffee': 'coffeescript/register', '.coffee.md': 'coffeescript/register', - '.csv': 'require-csv', '.eg': 'earlgrey/register', '.esm.js': { module: 'esm', diff --git a/index.js b/index.js index ec21f8a..0baf229 100644 --- a/index.js +++ b/index.js @@ -64,7 +64,6 @@ var extensions = { }, '.coffee': 'coffeescript/register', '.coffee.md': 'coffeescript/register', - '.csv': 'require-csv', '.eg': 'earlgrey/register', '.esbuild.js': { module: 'esbuild-register/dist/node', diff --git a/package.json b/package.json index e94c69d..272f806 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,6 @@ "coffee", "coffee.md", "coffeescript", - "csv", "earlgrey", "es", "es6", diff --git a/test/fixtures/csv/0/package.json b/test/fixtures/csv/0/package.json deleted file mode 100644 index dc76fcc..0000000 --- a/test/fixtures/csv/0/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "require-csv": "0.0.1" - } -} diff --git a/test/fixtures/csv/0/test.csv b/test/fixtures/csv/0/test.csv deleted file mode 100644 index d831a3d..0000000 --- a/test/fixtures/csv/0/test.csv +++ /dev/null @@ -1,2 +0,0 @@ -"r1c1","r1c2" -"r2c1","r2c2" diff --git a/test/index.js b/test/index.js index 9e3e82a..5bf59e3 100644 --- a/test/index.js +++ b/test/index.js @@ -171,10 +171,6 @@ describe('interpret.extensions', function() { }; expect(require(fixture)).toEqual(expected); break; - case '.csv': - expected = [['r1c1','r1c2'], ['r2c1','r2c2']]; - expect(require(fixture)).toEqual(expected); - break; case '.ini': expected = { data: { From 5db4d96ae833e7fdb7d2fbc8986cb74fcfce9f18 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Wed, 6 Apr 2022 17:02:32 -0700 Subject: [PATCH 14/19] chore!: Remove legacy earlgrey support --- README.md | 1 - index.js | 2 -- package.json | 1 - test/fixtures/eg/0/package.json | 5 ----- test/fixtures/eg/0/test.eg | 9 --------- test/index.js | 1 - 6 files changed, 19 deletions(-) delete mode 100644 test/fixtures/eg/0/package.json delete mode 100644 test/fixtures/eg/0/test.eg diff --git a/README.md b/README.md index 506a8c1..0efee3f 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,6 @@ Map file types to modules which provide a [require.extensions] loader. ], '.coffee': 'coffeescript/register', '.coffee.md': 'coffeescript/register', - '.eg': 'earlgrey/register', '.esm.js': { module: 'esm', register: function(hook) { diff --git a/index.js b/index.js index 0baf229..007791d 100644 --- a/index.js +++ b/index.js @@ -64,7 +64,6 @@ var extensions = { }, '.coffee': 'coffeescript/register', '.coffee.md': 'coffeescript/register', - '.eg': 'earlgrey/register', '.esbuild.js': { module: 'esbuild-register/dist/node', register: function(mod) { @@ -238,7 +237,6 @@ var jsVariantExtensions = [ '.esbuild.tsx', '.coffee', '.coffee.md', - '.eg', '.esm.js', '.iced', '.iced.md', diff --git a/package.json b/package.json index 272f806..7dcc243 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,6 @@ "coffee", "coffee.md", "coffeescript", - "earlgrey", "es", "es6", "iced", diff --git a/test/fixtures/eg/0/package.json b/test/fixtures/eg/0/package.json deleted file mode 100644 index 9ad12c9..0000000 --- a/test/fixtures/eg/0/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "earlgrey": "^0.1.2" - } -} diff --git a/test/fixtures/eg/0/test.eg b/test/fixtures/eg/0/test.eg deleted file mode 100644 index 7ee06f1..0000000 --- a/test/fixtures/eg/0/test.eg +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = { - data = { - trueKey = true - falseKey = false - subKey = { - subProp = 1 - } - } -} diff --git a/test/index.js b/test/index.js index 5bf59e3..d63a835 100644 --- a/test/index.js +++ b/test/index.js @@ -51,7 +51,6 @@ function cleanup() { var minVersions = { '@babel/register': { major: 6, minor: 0 }, coffeescript: { major: 6, minor: 0 }, - earlgrey: { major: 0, minor: 12 }, esm: { major: 6, minor: 0 }, json5: { major: 6, minor: 0 }, sucrase: { major: 8, minor: 0 }, From 87b21ca4e8c53796f69f09d8081f4739ff4498ec Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Wed, 6 Apr 2022 17:08:05 -0700 Subject: [PATCH 15/19] chore!: Remove legacy iced-coffee-script support --- README.md | 3 --- index.js | 6 ------ package.json | 4 ---- test/fixtures/iced.md/0/package.json | 5 ----- test/fixtures/iced.md/0/test.iced.md | 9 --------- test/fixtures/iced/0/package.json | 5 ----- test/fixtures/iced/0/test.iced | 6 ------ test/fixtures/iced/1/package.json | 5 ----- test/fixtures/iced/1/test.iced | 6 ------ test/fixtures/liticed/0/package.json | 5 ----- test/fixtures/liticed/0/test.liticed | 8 -------- 11 files changed, 62 deletions(-) delete mode 100644 test/fixtures/iced.md/0/package.json delete mode 100644 test/fixtures/iced.md/0/test.iced.md delete mode 100644 test/fixtures/iced/0/package.json delete mode 100644 test/fixtures/iced/0/test.iced delete mode 100644 test/fixtures/iced/1/package.json delete mode 100644 test/fixtures/iced/1/test.iced delete mode 100644 test/fixtures/liticed/0/package.json delete mode 100644 test/fixtures/liticed/0/test.liticed diff --git a/README.md b/README.md index 0efee3f..f9ed03f 100644 --- a/README.md +++ b/README.md @@ -59,8 +59,6 @@ Map file types to modules which provide a [require.extensions] loader. require.extensions['.js'] = esmLoader('module')._extensions['.js']; }, }, - '.iced': ['iced-coffee-script/register', 'iced-coffee-script'], - '.iced.md': 'iced-coffee-script/register', '.ini': 'require-ini', '.js': null, '.json': null, @@ -76,7 +74,6 @@ Map file types to modules which provide a [require.extensions] loader. }, }, '.litcoffee': 'coffeescript/register', - '.liticed': 'iced-coffee-script/register', '.ls': ['livescript', 'LiveScript'], '.mjs': '/absolute/path/to/interpret/mjs-stub.js', '.node': null, diff --git a/index.js b/index.js index 007791d..ff1e245 100644 --- a/index.js +++ b/index.js @@ -121,8 +121,6 @@ var extensions = { require.extensions['.js'] = esmLoader('module')._extensions['.js']; }, }, - '.iced': ['iced-coffee-script/register', 'iced-coffee-script'], - '.iced.md': 'iced-coffee-script/register', '.ini': 'require-ini', '.js': null, '.json': null, @@ -138,7 +136,6 @@ var extensions = { }, }, '.litcoffee': 'coffeescript/register', - '.liticed': 'iced-coffee-script/register', '.ls': ['livescript', 'LiveScript'], '.mjs': mjsStub, '.node': null, @@ -238,11 +235,8 @@ var jsVariantExtensions = [ '.coffee', '.coffee.md', '.esm.js', - '.iced', - '.iced.md', '.jsx', '.litcoffee', - '.liticed', '.ls', '.mjs', '.ts', diff --git a/package.json b/package.json index 7dcc243..32af088 100644 --- a/package.json +++ b/package.json @@ -44,9 +44,6 @@ "coffeescript", "es", "es6", - "iced", - "iced.md", - "iced-coffee-script", "ini", "js", "json", @@ -54,7 +51,6 @@ "jsx", "react", "litcoffee", - "liticed", "ls", "livescript", "toml", diff --git a/test/fixtures/iced.md/0/package.json b/test/fixtures/iced.md/0/package.json deleted file mode 100644 index 9980657..0000000 --- a/test/fixtures/iced.md/0/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "iced-coffee-script": "^108.0.11" - } -} diff --git a/test/fixtures/iced.md/0/test.iced.md b/test/fixtures/iced.md/0/test.iced.md deleted file mode 100644 index 55dc760..0000000 --- a/test/fixtures/iced.md/0/test.iced.md +++ /dev/null @@ -1,9 +0,0 @@ -Test Fixture -============ - - module.exports = - data: - trueKey: true - falseKey: false - subKey: - subProp: 1 diff --git a/test/fixtures/iced/0/package.json b/test/fixtures/iced/0/package.json deleted file mode 100644 index 9980657..0000000 --- a/test/fixtures/iced/0/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "iced-coffee-script": "^108.0.11" - } -} diff --git a/test/fixtures/iced/0/test.iced b/test/fixtures/iced/0/test.iced deleted file mode 100644 index 61d3b46..0000000 --- a/test/fixtures/iced/0/test.iced +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = - data: - trueKey: true - falseKey: false - subKey: - subProp: 1 diff --git a/test/fixtures/iced/1/package.json b/test/fixtures/iced/1/package.json deleted file mode 100644 index 9980657..0000000 --- a/test/fixtures/iced/1/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "iced-coffee-script": "^108.0.11" - } -} diff --git a/test/fixtures/iced/1/test.iced b/test/fixtures/iced/1/test.iced deleted file mode 100644 index 61d3b46..0000000 --- a/test/fixtures/iced/1/test.iced +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = - data: - trueKey: true - falseKey: false - subKey: - subProp: 1 diff --git a/test/fixtures/liticed/0/package.json b/test/fixtures/liticed/0/package.json deleted file mode 100644 index 9980657..0000000 --- a/test/fixtures/liticed/0/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "iced-coffee-script": "^108.0.11" - } -} diff --git a/test/fixtures/liticed/0/test.liticed b/test/fixtures/liticed/0/test.liticed deleted file mode 100644 index 297d23f..0000000 --- a/test/fixtures/liticed/0/test.liticed +++ /dev/null @@ -1,8 +0,0 @@ -# comment - - module.exports = - data: - trueKey: true - falseKey: false - subKey: - subProp: 1 From 69ddb97c35758cb0884c0e7a5671bb23e2739736 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Wed, 6 Apr 2022 17:11:26 -0700 Subject: [PATCH 16/19] chore!: Remove legacy require-ini support --- README.md | 1 - index.js | 1 - package.json | 1 - test/fixtures/ini/0/package.json | 5 ----- test/fixtures/ini/0/test.ini | 4 ---- test/index.js | 12 ------------ 6 files changed, 24 deletions(-) delete mode 100644 test/fixtures/ini/0/package.json delete mode 100644 test/fixtures/ini/0/test.ini diff --git a/README.md b/README.md index f9ed03f..8f7d587 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,6 @@ Map file types to modules which provide a [require.extensions] loader. require.extensions['.js'] = esmLoader('module')._extensions['.js']; }, }, - '.ini': 'require-ini', '.js': null, '.json': null, '.json5': ['json5/lib/register', 'json5/lib/require'], diff --git a/index.js b/index.js index ff1e245..7c07f29 100644 --- a/index.js +++ b/index.js @@ -121,7 +121,6 @@ var extensions = { require.extensions['.js'] = esmLoader('module')._extensions['.js']; }, }, - '.ini': 'require-ini', '.js': null, '.json': null, '.json5': ['json5/lib/register', 'json5/lib/require'], diff --git a/package.json b/package.json index 32af088..fa44f87 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,6 @@ "coffeescript", "es", "es6", - "ini", "js", "json", "json5", diff --git a/test/fixtures/ini/0/package.json b/test/fixtures/ini/0/package.json deleted file mode 100644 index 08f0b7d..0000000 --- a/test/fixtures/ini/0/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "require-ini": "0.0.1" - } -} diff --git a/test/fixtures/ini/0/test.ini b/test/fixtures/ini/0/test.ini deleted file mode 100644 index d52fa6a..0000000 --- a/test/fixtures/ini/0/test.ini +++ /dev/null @@ -1,4 +0,0 @@ -[data] - falseKey = false - subKey[subProp] = 1 - trueKey = true diff --git a/test/index.js b/test/index.js index d63a835..ef037c2 100644 --- a/test/index.js +++ b/test/index.js @@ -170,18 +170,6 @@ describe('interpret.extensions', function() { }; expect(require(fixture)).toEqual(expected); break; - case '.ini': - expected = { - data: { - trueKey: 'true', - falseKey: 'false', - subKey: { - subProp: '1', - }, - }, - }; - expect(require(fixture)).toEqual(expected); - break; case '.toml': expected = Object.create(null); From 7d17e50db84791117a769689647e8efba7a3b833 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Wed, 6 Apr 2022 17:14:58 -0700 Subject: [PATCH 17/19] chore!: Remove legacy json5 hook --- README.md | 2 +- index.js | 2 +- test/fixtures/json5/1/package.json | 5 ----- test/fixtures/json5/1/test.json5 | 10 ---------- 4 files changed, 2 insertions(+), 17 deletions(-) delete mode 100644 test/fixtures/json5/1/package.json delete mode 100644 test/fixtures/json5/1/test.json5 diff --git a/README.md b/README.md index 8f7d587..83d8f56 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ Map file types to modules which provide a [require.extensions] loader. }, '.js': null, '.json': null, - '.json5': ['json5/lib/register', 'json5/lib/require'], + '.json5': 'json5/lib/register', '.jsx': { module: '@babel/register', register: function(hook) { diff --git a/index.js b/index.js index 7c07f29..678d9ec 100644 --- a/index.js +++ b/index.js @@ -123,7 +123,7 @@ var extensions = { }, '.js': null, '.json': null, - '.json5': ['json5/lib/register', 'json5/lib/require'], + '.json5': 'json5/lib/register', '.jsx': { module: '@babel/register', register: function(hook) { diff --git a/test/fixtures/json5/1/package.json b/test/fixtures/json5/1/package.json deleted file mode 100644 index 620e3d5..0000000 --- a/test/fixtures/json5/1/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "json5": "^0.5.0" - } -} diff --git a/test/fixtures/json5/1/test.json5 b/test/fixtures/json5/1/test.json5 deleted file mode 100644 index 3b39a49..0000000 --- a/test/fixtures/json5/1/test.json5 +++ /dev/null @@ -1,10 +0,0 @@ -{ - "data": { - "trueKey": true, - "falseKey": false, - "subKey": { - "subProp": 1 - } - } - /* omg, a comment in json?? */ -} From 65716ea28feae946ce32e18fab4d908f2a312743 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Wed, 6 Apr 2022 17:17:16 -0700 Subject: [PATCH 18/19] chore!: Remove legacy livescript support --- README.md | 1 - index.js | 2 -- package.json | 2 -- test/fixtures/ls/0/package.json | 5 ----- test/fixtures/ls/0/test.ls | 6 ------ test/fixtures/ls/1/package.json | 5 ----- test/fixtures/ls/1/test.ls | 6 ------ 7 files changed, 27 deletions(-) delete mode 100644 test/fixtures/ls/0/package.json delete mode 100644 test/fixtures/ls/0/test.ls delete mode 100644 test/fixtures/ls/1/package.json delete mode 100644 test/fixtures/ls/1/test.ls diff --git a/README.md b/README.md index 83d8f56..c2e60f0 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,6 @@ Map file types to modules which provide a [require.extensions] loader. }, }, '.litcoffee': 'coffeescript/register', - '.ls': ['livescript', 'LiveScript'], '.mjs': '/absolute/path/to/interpret/mjs-stub.js', '.node': null, '.toml': { diff --git a/index.js b/index.js index 678d9ec..33dbd06 100644 --- a/index.js +++ b/index.js @@ -135,7 +135,6 @@ var extensions = { }, }, '.litcoffee': 'coffeescript/register', - '.ls': ['livescript', 'LiveScript'], '.mjs': mjsStub, '.node': null, '.toml': { @@ -236,7 +235,6 @@ var jsVariantExtensions = [ '.esm.js', '.jsx', '.litcoffee', - '.ls', '.mjs', '.ts', '.tsx', diff --git a/package.json b/package.json index fa44f87..6ed2b13 100644 --- a/package.json +++ b/package.json @@ -50,8 +50,6 @@ "jsx", "react", "litcoffee", - "ls", - "livescript", "toml", "ts", "typescript", diff --git a/test/fixtures/ls/0/package.json b/test/fixtures/ls/0/package.json deleted file mode 100644 index 3ecf027..0000000 --- a/test/fixtures/ls/0/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "livescript": "^1.6.0" - } -} diff --git a/test/fixtures/ls/0/test.ls b/test/fixtures/ls/0/test.ls deleted file mode 100644 index 61d3b46..0000000 --- a/test/fixtures/ls/0/test.ls +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = - data: - trueKey: true - falseKey: false - subKey: - subProp: 1 diff --git a/test/fixtures/ls/1/package.json b/test/fixtures/ls/1/package.json deleted file mode 100644 index 5d2fab9..0000000 --- a/test/fixtures/ls/1/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "LiveScript": "^1.3.1" - } -} diff --git a/test/fixtures/ls/1/test.ls b/test/fixtures/ls/1/test.ls deleted file mode 100644 index 61d3b46..0000000 --- a/test/fixtures/ls/1/test.ls +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = - data: - trueKey: true - falseKey: false - subKey: - subProp: 1 From f41ba0ada0d29306234e8cce251bf47e6e0692f2 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Wed, 6 Apr 2022 17:20:17 -0700 Subject: [PATCH 19/19] chore!: Remove legacy wisp support --- README.md | 1 - index.js | 2 -- package.json | 1 - test/fixtures/wisp/0/package.json | 5 ----- test/fixtures/wisp/0/test.wisp | 1 - test/index.js | 1 - 6 files changed, 11 deletions(-) delete mode 100644 test/fixtures/wisp/0/package.json delete mode 100644 test/fixtures/wisp/0/test.wisp diff --git a/README.md b/README.md index c2e60f0..dee4bec 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,6 @@ Map file types to modules which provide a [require.extensions] loader. }, }, ], - '.wisp': 'wisp/engine/node', '.yaml': 'yaml-hook/register', '.yml': 'yaml-hook/register', } diff --git a/index.js b/index.js index 33dbd06..1cabc4a 100644 --- a/index.js +++ b/index.js @@ -215,7 +215,6 @@ var extensions = { }, }, ], - '.wisp': 'wisp/engine/node', '.yaml': 'yaml-hook/register', '.yml': 'yaml-hook/register', }; @@ -238,7 +237,6 @@ var jsVariantExtensions = [ '.mjs', '.ts', '.tsx', - '.wisp', ]; module.exports = { diff --git a/package.json b/package.json index 6ed2b13..12a5387 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,6 @@ "toml", "ts", "typescript", - "wisp", "xml", "yaml", "yml" diff --git a/test/fixtures/wisp/0/package.json b/test/fixtures/wisp/0/package.json deleted file mode 100644 index c061cb9..0000000 --- a/test/fixtures/wisp/0/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "wisp": "^0.11.1" - } -} diff --git a/test/fixtures/wisp/0/test.wisp b/test/fixtures/wisp/0/test.wisp deleted file mode 100644 index 18c19b4..0000000 --- a/test/fixtures/wisp/0/test.wisp +++ /dev/null @@ -1 +0,0 @@ -(set! module.exports { :data { :falseKey false, :trueKey true, :subKey { :subProp 1 } } }) diff --git a/test/index.js b/test/index.js index ef037c2..e6451a1 100644 --- a/test/index.js +++ b/test/index.js @@ -55,7 +55,6 @@ var minVersions = { json5: { major: 6, minor: 0 }, sucrase: { major: 8, minor: 0 }, 'ts-node': { major: 4, minor: 0 }, - wisp: { major: 0, minor: 12 }, 'toml-require': { major: 6, minor: 0 }, };