Skip to content

Commit 5cd5430

Browse files
chore: migrate to NodeNext module resolution and update JSON imports
1 parent 16dc98d commit 5cd5430

5 files changed

Lines changed: 14 additions & 14 deletions

File tree

build.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import arg from 'arg'
2-
import generatePatchBody from './generators/generatePatchBody'
2+
import generatePatchBody from './generators/generatePatchBody.js'
33
import fs from 'fs'
44
import path from 'path'
5-
import generateTerraformPropertyRules from './generators/generateTerraformPropertyRules'
5+
import generateTerraformPropertyRules from './generators/generateTerraformPropertyRules.js'
66

77
const args = arg({
88
'--type': String,

generators/generatePatchBody.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import rulesTemplate from '../assets/rulesTemplate.json'
2-
import rulePatch from '../assets/patch-body/patchBodyAddRule.json'
3-
import variablePatch from '../assets/patch-body/patchBodyAddVariable.json'
4-
import variables from '../assets/variables.json'
5-
import packageJSON from '../package.json'
1+
import rulesTemplate from '../assets/rulesTemplate.json' with { type: 'json' }
2+
import rulePatch from '../assets/patch-body/patchBodyAddRule.json' with { type: 'json' }
3+
import variablePatch from '../assets/patch-body/patchBodyAddVariable.json' with { type: 'json' }
4+
import variables from '../assets/variables.json' with { type: 'json' }
5+
import packageJSON from '../package.json' with { type: 'json' }
66

77
interface PatchBodyOptions {
88
integrationPath?: string

generators/generateTerraformPropertyRules.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import rulesTemplate from '../assets/rulesTemplate.json'
2-
import variablesTemplate from '../assets/variables.json'
3-
import packageJSON from '../package.json'
1+
import rulesTemplate from '../assets/rulesTemplate.json' with { type: 'json' }
2+
import variablesTemplate from '../assets/variables.json' with { type: 'json' }
3+
import packageJSON from '../package.json' with { type: 'json' }
44

55
interface TerraformOptions {
66
ingressUrl: string

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
"test:dts": "echo \"there are no typechecks planned\"",
1818
"lint": "eslint --ext .js,.ts .",
1919
"lint:fix": "pnpm lint --fix",
20-
"build": "ts-node build.ts",
20+
"build": "node --loader ts-node/esm build.ts",
2121
"test:e2e": "pnpm playwright test --workers=8 --max-failures=1",
22-
"test:mock-e2e": "ts-node scripts/mockTests.ts",
22+
"test:mock-e2e": "node --loader ts-node/esm scripts/mockTests.ts",
2323
"prepare": "husky install"
2424
},
2525
"devDependencies": {

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"extends": "@fingerprintjs/tsconfig-dx-team/tsconfig.json",
33
"compilerOptions": {
4-
"module": "commonjs",
5-
"moduleResolution": "node",
4+
"module": "ESNext",
5+
"moduleResolution": "NodeNext",
66
"noImplicitAny": false,
77
"rootDir": ".",
88
"strict": true,

0 commit comments

Comments
 (0)