From 67c9efbdf9450ff37ff4f622bab78629d572bcda Mon Sep 17 00:00:00 2001 From: "Chris. Webster" Date: Sun, 4 Aug 2024 21:52:52 -0700 Subject: [PATCH] es modules: config changes Config changes as first step to convert to es modules. This breaks everything. Subsequent parts of this set will make it all work again. Signed-off-by: Chris. Webster --- package-lock.json | 14 ++++++++++++-- package.json | 2 ++ tsconfig.json | 8 ++++---- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9326585cb3..225dfc3134 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,6 +30,7 @@ "@types/jsonwebtoken": "^9.0.6", "@types/mailparser": "^3.4.4", "@types/marked": "^6.0.0", + "@types/node": "^22.1.0", "@types/nodemailer": "^6.4.15", "@types/rfc2047": "^2.0.3", "@typescript-eslint/eslint-plugin": "^7.18.0", @@ -1699,8 +1700,12 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "18.7.23", - "license": "MIT" + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.1.0.tgz", + "integrity": "sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw==", + "dependencies": { + "undici-types": "~6.13.0" + } }, "node_modules/@types/nodemailer": { "version": "6.4.15", @@ -6109,6 +6114,11 @@ "version": "2.0.0", "license": "MIT" }, + "node_modules/undici-types": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.13.0.tgz", + "integrity": "sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==" + }, "node_modules/universal-github-app-jwt": { "version": "1.1.2", "license": "MIT", diff --git a/package.json b/package.json index 1f906e7074..319a42117d 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "lib": "lib", "test": "tests" }, + "type": "module", "scripts": { "build": "tsc", "cleanbranch": "node ./build/script/delete-test-branches.js", @@ -45,6 +46,7 @@ "@types/jsonwebtoken": "^9.0.6", "@types/mailparser": "^3.4.4", "@types/marked": "^6.0.0", + "@types/node": "^22.1.0", "@types/nodemailer": "^6.4.15", "@types/rfc2047": "^2.0.3", "@typescript-eslint/eslint-plugin": "^7.18.0", diff --git a/tsconfig.json b/tsconfig.json index b75dd18473..71cbfe8ffd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,9 +1,9 @@ { "compilerOptions": { /* Basic Options */ - "target": "es2021", /* Specify ECMAScript target version. */ - "module": "commonjs", /* Specify module code generation. */ - "lib": ["es2021"], /* Specify library files to be included in the compilation. */ + "target": "es2023", /* Specify ECMAScript target version. */ + "module": "Node16", /* Specify module code generation. */ + // "lib": ["es2023"], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ @@ -34,7 +34,7 @@ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "moduleResolution": "Node16", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */