Skip to content

Commit

Permalink
fix: change node version to 21
Browse files Browse the repository at this point in the history
  • Loading branch information
johangirod committed Dec 13, 2023
1 parent 5e24708 commit 37c3149
Show file tree
Hide file tree
Showing 15 changed files with 369 additions and 7,665 deletions.
2 changes: 1 addition & 1 deletion .github/actions/install/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ runs:
steps:
- uses: actions/setup-node@v3
with:
node-version: '18'
node-version: '21'
cache: 'yarn'
- run: yarn install --immutable
shell: bash
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"eslint.format.enable": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"githubPullRequests.ignoredPullRequestBranches": ["master"]
}
1 change: 0 additions & 1 deletion api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
"@types/node": "^20.6.3",
"@types/swagger-ui-dist": "^3.30.1",
"chai-http": "^4.4.0",
"ts-node": "^10.9.1",
"typescript": "^5.2.2",
"vitest": "^0.34.4",
"wait-on": "^7.0.1"
Expand Down
3 changes: 0 additions & 3 deletions api/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@
// remove this when vite support "NodeNext" : https://github.com/vitejs/vite/issues/10481 or https://github.com/vitejs/vite/issues/8993
"skipLibCheck": true
},
"ts-node": {
"esm": true
},
"include": ["source"],
"exclude": ["**/dist", "vitest.config.ts"]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@
},
"packageManager": "[email protected]",
"engines": {
"node": "^18"
"node": "^21"
}
}
1 change: 0 additions & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"@types/koa__router": "^12.0.1",
"@types/node": "^20.6.3",
"@types/safe-timers": "^1.1.0",
"ts-node": "^10.9.1",
"typescript": "^5.2.2"
},
"engines": {
Expand Down
5 changes: 1 addition & 4 deletions server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@
/* Advanced Options */
"forceConsistentCasingInFileNames": true
},
"ts-node": {
"esm": true,
"files": true
},

"include": ["source", "types/**/*.d.ts"],
"exclude": ["**/node_modules", "**/dist", "vitest.config.ts"]
}
2 changes: 1 addition & 1 deletion site/build/build-sitemap.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { writeFileSync } from 'node:fs'

import { absoluteSitePaths, generateSiteMap } from '../source/sitePaths.js'
import { absoluteSitePaths, generateSiteMap } from '../source/sitePaths.ts'

const basePathEn =
process.env.VITE_EN_BASE_URL ?? 'http://localhost:3000/infrance'
Expand Down
2 changes: 1 addition & 1 deletion site/build/prerender-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import path from 'node:path'
import { fileURLToPath } from 'url'

// @ts-ignore
import { render } from '../dist/ssr/entry-server.js'
import { render } from '../dist/ssr/entry-server'

const dirname = path.dirname(fileURLToPath(import.meta.url))

Expand Down
4 changes: 3 additions & 1 deletion site/build/prerender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import { absoluteSitePaths } from '../source/sitePaths.js'
const filename = new URL('./prerender-worker.ts', import.meta.url).href
const pool = new Tinypool({
filename,
execArgv: ['--loader', 'ts-node/esm'],
execArgv: ['--import', 'tsx/esm'],
idleTimeout: 2000,
runtime: 'child_process',
})

const sitePathFr = absoluteSitePaths.fr
Expand Down Expand Up @@ -66,6 +67,7 @@ const redirects = await Promise.all(
urls.map(async (url) => {
const path = await (pool.run({
site,

url,
lang: site === 'mon-entreprise' ? 'fr' : 'en',
}) as Promise<string>)
Expand Down
18 changes: 6 additions & 12 deletions site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
"start:netlify": "sed 's|:SITE_EN|/infrance|g' netlify.base.toml | sed 's|:SITE_FR|/mon-entreprise|g' | sed 's|:API_URL|http://localhost:3004|g' | sed 's|\\[\\[redirects\\]\\]|\\[\\[redirects\\]\\]\\n force = true|g' > netlify.toml && HMR_CLIENT_PORT=8888 netlify dev",
"build:iframe-script": "NODE_OPTIONS='--max-old-space-size=4096'; vite build --config build/vite-iframe-script.config.ts",
"build:simulator-data": "vite build --config build/vite-build-simulation-data.config.ts",
"build:prerender": "ts-node-esm build/prerender.ts",
"build:sitemap": "ts-node-esm build/build-sitemap.ts",
"build:prerender": "tsx build/prerender.ts",
"build:sitemap": "tsx build/build-sitemap.ts",
"build:ssr": "NODE_OPTIONS='--max-old-space-size=4096'; vite build --ssr ./source/entries/entry-server.tsx --outDir ./dist/ssr --emptyOutDir && echo '{\"type\": \"module\"}' > dist/package.json",
"build:yaml-to-dts": "ts-node-esm build/build-yaml-to-dts.ts",
"build:yaml-to-dts": "tsx build/build-yaml-to-dts.ts",
"algolia:clean": "node scripts/search/clean.js",
"algolia:update": "yarn build:simulator-data && ts-node-esm ./scripts/search/update-data.ts",
"algolia:update": "yarn build:simulator-data && tsx ./scripts/search/update-data.ts",
"i18n:rules:check": "node scripts/i18n/check-missing-rule-translation.js",
"i18n:rules:translate": "node scripts/i18n/translate-rules.js",
"i18n:ui:check": "i18next -c scripts/i18n/parser.config.js && node scripts/i18n/check-missing-UI-translation.js",
Expand Down Expand Up @@ -93,7 +93,6 @@
"redux": "^4.2.1",
"reselect": "^4.1.8",
"styled-components": "^6.0.8",
"stylis": "^4.3.0",
"whatwg-fetch": "^3.6.19"
},
"devDependencies": {
Expand All @@ -103,7 +102,6 @@
"@redux-devtools/extension": "^3.2.5",
"@rollup/plugin-replace": "^5.0.2",
"@rollup/plugin-yaml": "^4.1.1",
"@rushstack/package-deps-hash": "^3.2.67",
"@sentry/vite-plugin": "^2.7.1",
"@storybook/addon-a11y": "^7.4.2",
"@storybook/addon-actions": "^7.4.2",
Expand All @@ -129,22 +127,18 @@
"cypress-wait-until": "^1.7.2",
"dotenv": "^16.3.1",
"i18next-parser": "^8.7.0",
"netlify-cli": "^16.4.0",
"rollup-plugin-toml": "^1.0.0",
"serve-static": "^1.15.0",
"storybook": "^7.4.3",
"ts-morph": "^19.0.0",
"ts-node": "^10.9.1",
"tinypool": "^0.8.1",
"tsx": "^4.6.2",
"typescript": "^5.2.2",
"vite": "^4.4.9",
"vite-plugin-pwa": "^0.16.5",
"vitest": "^0.34.4",
"workbox-expiration": "^7.0.0",
"workbox-navigation-preload": "^7.0.0",
"workbox-precaching": "^7.0.0",
"workbox-routing": "^7.0.0",
"workbox-strategies": "^7.0.0",
"workbox-window": "^7.0.0",
"xml2js": "^0.4.23",
"yaml": "^2.3.2"
}
Expand Down
10 changes: 5 additions & 5 deletions site/scripts/NAFAndGuichetData/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
"node": "^18"
},
"scripts": {
"extract-NAF-from-PDF": "ts-node-esm ./extract-NAF-data/convert-pdf.ts",
"extract-guichet": "ts-node-esm ./NomenclatureGuichet/extract.ts",
"fetch-nombre-etablissements": "ts-node-esm ./nombre-etablissements-par-code-ape/fetch-json.ts",
"merge-data": "ts-node-esm ./NAF-search/merge-data.ts",
"extract-NAF-from-PDF": "tsx ./extract-NAF-data/convert-pdf.ts",
"extract-guichet": "tsx ./NomenclatureGuichet/extract.ts",
"fetch-nombre-etablissements": "tsx ./nombre-etablissements-par-code-ape/fetch-json.ts",
"merge-data": "tsx ./NAF-search/merge-data.ts",
"build": "yarn extract-NAF-from-PDF && yarn extract-guichet && yarn fetch-nombre-etablissements && yarn merge-data"
},
"devDependencies": {
"csv": "^6.2.7",
"csv-parser": "^3.0.0",
"pdfdataextract": "^3.2.0",
"ts-node": "^10.9.1"
"tsx": "^4.6.2"
}
}
Loading

0 comments on commit 37c3149

Please sign in to comment.