Skip to content

Commit d9cb3c9

Browse files
authored
Drop support for Node v12 (#161)
* Drop support for Node v12 * update
1 parent 21fbce2 commit d9cb3c9

File tree

4 files changed

+6
-17
lines changed

4 files changed

+6
-17
lines changed

.github/workflows/NodeCI.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,17 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v3
1414
- uses: actions/setup-node@v3
15-
with:
16-
node-version: 14
1715
- name: Install Packages
18-
run: npm install
16+
run: npm install --legacy-peer-deps
1917
- name: Lint
2018
run: npm run lint
2119
build:
2220
runs-on: ubuntu-latest
2321
steps:
2422
- uses: actions/checkout@v3
2523
- uses: actions/setup-node@v3
26-
with:
27-
node-version: 14
2824
- name: Install Packages
29-
run: npm install
25+
run: npm install --legacy-peer-deps
3026
- name: Build
3127
run: |+
3228
npm run update
@@ -38,7 +34,7 @@ jobs:
3834
matrix:
3935
os: [ubuntu-latest]
4036
eslint: [7, 8]
41-
node: [12, 14, 16, 17]
37+
node: [14, 16, 17, 18]
4238
steps:
4339
- name: Checkout
4440
uses: actions/checkout@v3

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ npm install --save-dev eslint @ota-meshi/eslint-plugin-svelte svelte
4646
> **Requirements**
4747
>
4848
> - ESLint v7.0.0 and above
49-
> - Node.js v12.22.x, v14.17.x, v16.x and above
49+
> - Node.js v14.17.x, v16.x and above
5050
5151
<!--DOCS_IGNORE_END-->
5252

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"lib"
1111
],
1212
"engines": {
13-
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
13+
"node": "^14.17.0 || >=16.0.0"
1414
},
1515
"scripts": {
1616
"prebuild": "npm run -s clean",

src/shared/svelte-compile-warns/transform/load-module.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,9 @@ export function loadModule<R>(context: RuleContext, name: string): R | null {
1717
const mod = modules[name] || cache4b.get(name)
1818
if (mod) return mod as R
1919
try {
20-
const createRequire: (filename: string) => (modName: string) => unknown =
21-
// Added in v12.2.0
22-
Module.createRequire ||
23-
// Added in v10.12.0, but deprecated in v12.2.0.
24-
// @ts-expect-error -- old type
25-
Module.createRequireFromPath
26-
2720
const cwd = context.getCwd?.() ?? process.cwd()
2821
const relativeTo = path.join(cwd, "__placeholder__.js")
29-
return (modules[name] = createRequire(relativeTo)(name) as R)
22+
return (modules[name] = Module.createRequire(relativeTo)(name) as R)
3023
} catch {
3124
return null
3225
}

0 commit comments

Comments
 (0)