From 95fee986e8b497cb3142586b73526d36ca5a8495 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 Jan 2025 12:22:21 +0000 Subject: [PATCH] Chore(deps-dev): bump typescript from 5.5.4 to 5.7.2 (#244) * Chore(deps-dev): bump typescript from 5.5.4 to 5.7.2 Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.5.4 to 5.7.2. - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml) - [Commits](https://github.com/microsoft/TypeScript/compare/v5.5.4...v5.7.2) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Change the way ts utilities are run for latest typescript in Node 20+ * Better solution to running scripts as ESM whilst not applying that to the whole project * lint --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Pete Edwards --- .gitignore | 10 ++-------- .prettierignore | 1 + package-lock.json | 10 +++++----- package.json | 8 ++++---- scripts/preparePurposes.ts | 5 +++-- tsconfig.scripts.json | 16 ++++++++++++++++ 6 files changed, 31 insertions(+), 19 deletions(-) create mode 100644 tsconfig.scripts.json diff --git a/.gitignore b/.gitignore index 884114f2..6367c084 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ test-results/ # production /build +/dist # misc .DS_Store @@ -29,6 +30,7 @@ yarn-error.log* .pnpm-debug.log* # local env files +.env .env.local .env.development.local .env.test.local @@ -41,13 +43,5 @@ yarn-error.log* *.tsbuildinfo next-env.d.ts -npm-debug.log* -yarn-debug.log* -yarn-error.log* - # Sentry .sentryclirc - -# Developers' Environment Variables -.env -.env.local diff --git a/.prettierignore b/.prettierignore index 3e7e4ff7..891a8ff2 100644 --- a/.prettierignore +++ b/.prettierignore @@ -4,3 +4,4 @@ /.next /e2e/test-app/.next src/cache/purposesParsed.ts +/dist diff --git a/package-lock.json b/package-lock.json index 725379d6..ded58c93 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,7 +42,7 @@ "@inrupt/eslint-config-react": "^3.2.4", "@inrupt/internal-playwright-helpers": "^3.2.4", "@inrupt/internal-playwright-testids": "^3.2.2", - "@inrupt/internal-test-env": "^3.2.2", + "@inrupt/internal-test-env": "^3.2.4", "@inrupt/jest-jsdom-polyfills": "^3.2.4", "@next/eslint-plugin-next": "^14.2.15", "@playwright/test": "~1.47.2", @@ -68,7 +68,7 @@ "jest-environment-jsdom": "^29.7.0", "ts-jest": "^29.2.4", "ts-node": "^10.9.2", - "typescript": "^5.5.4" + "typescript": "^5.7.2" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -13870,9 +13870,9 @@ } }, "node_modules/typescript": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", - "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", "dev": true, "bin": { "tsc": "bin/tsc", diff --git a/package.json b/package.json index 3fa9e22e..7c5f5638 100644 --- a/package.json +++ b/package.json @@ -17,11 +17,11 @@ "start": "next start", "test": "TZ=UTC jest --runInBand", "test:e2e": "playwright test", - "update-clientId": "npm ci && npx ts-node --skip-project scripts/updateClientId.ts", + "update-clientId": "npm ci && tsc --project tsconfig.scripts.json && node dist/scripts/updateClientId.js", "bump-version": "changeset add", "version": "changeset version", "release": "changeset publish", - "preparePurposes": "npx ts-node --skip-project scripts/preparePurposes.ts" + "preparePurposes": "tsc --project tsconfig.scripts.json && node dist/scripts/preparePurposes.js ./src/cache" }, "dependencies": { "@changesets/changelog-github": "^0.5.0", @@ -58,7 +58,7 @@ "@inrupt/eslint-config-react": "^3.2.4", "@inrupt/internal-playwright-helpers": "^3.2.4", "@inrupt/internal-playwright-testids": "^3.2.2", - "@inrupt/internal-test-env": "^3.2.2", + "@inrupt/internal-test-env": "^3.2.4", "@inrupt/jest-jsdom-polyfills": "^3.2.4", "@next/eslint-plugin-next": "^14.2.15", "@playwright/test": "~1.47.2", @@ -84,7 +84,7 @@ "jest-environment-jsdom": "^29.7.0", "ts-jest": "^29.2.4", "ts-node": "^10.9.2", - "typescript": "^5.5.4" + "typescript": "^5.7.2" }, "browserslist": { "production": [ diff --git a/scripts/preparePurposes.ts b/scripts/preparePurposes.ts index f7f0747f..a031c705 100644 --- a/scripts/preparePurposes.ts +++ b/scripts/preparePurposes.ts @@ -39,7 +39,8 @@ async function main() { await addToCache(ont, cache); } - const cachePath = path.join(__dirname, "..", "src", "cache"); + const cachePath = process.argv[2]; + console.log("Path for cached purposes file: ", cachePath); if (!fs.existsSync(cachePath)) { fs.mkdirSync(cachePath); @@ -52,6 +53,6 @@ async function main() { } main().catch((e) => { - console.log("Error occured preparing purposes", e); + console.log("Error occurred preparing purposes", e); process.exit(1); }); diff --git a/tsconfig.scripts.json b/tsconfig.scripts.json new file mode 100644 index 00000000..fb73cd4d --- /dev/null +++ b/tsconfig.scripts.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "target": "es6", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, + "module": "nodenext", + "moduleResolution": "nodenext", + "outDir": "./dist" + }, + "include": ["scripts/*.ts"], + "exclude": ["node_modules"] +}