Skip to content

Commit

Permalink
chore: upgrade to TypeScript 5.5 (#6919)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCalzone authored Jul 5, 2024
1 parent 45fc808 commit 2a105e2
Show file tree
Hide file tree
Showing 45 changed files with 4,774 additions and 4,874 deletions.
2 changes: 1 addition & 1 deletion .dprint.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
".yarn/releases",
".tmp/",
"cache/",
"packages/*/api.md",
"packages/*/*.api.md",
"CHANGELOG*.md",
".yarnrc.yml",
],
Expand Down
2 changes: 1 addition & 1 deletion .github/action-scripts/generateTypedDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const branchName = "docs/update-typed-docs";
const reviewers = ["AlCalzone"];
const assignees = [];

const checkPaths = ["docs/", "packages/*/api.md"];
const checkPaths = ["docs/", "packages/*/*.api.md"];

/**
* @param {{github: Github, context: Context}} param
Expand Down
873 changes: 0 additions & 873 deletions .yarn/releases/yarn-3.5.0.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion api-extractor-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
* SUPPORTED TOKENS: <packageName>, <unscopedPackageName>
* DEFAULT VALUE: "<unscopedPackageName>.api.md"
*/
"reportFileName": "api.md",
// "reportFileName": "<unscopedPackageName>.api.md",

/**
* Specifies the folder where the API report file is written. The file name portion is determined by
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ const path = require("path");
const fs = require("fs");

const tsDirectory = path.dirname(require.resolve("typescript"));
const tsServerPath = path.join(tsDirectory, "tsserver.js");
let fileContent = fs.readFileSync(tsServerPath, "utf8");
const tsLibPath = path.join(tsDirectory, "typescript.js");
let fileContent = fs.readFileSync(tsLibPath, "utf8");

const replacements = [
[
Expand All @@ -17,15 +17,15 @@ const replacements = [
for (const [search, replace] of replacements) {
if (!fileContent.includes(search) && !fileContent.includes(replace)) {
fs.writeFileSync(
"patch-tsserver.log",
`Failed to patch tsserver.js - search string not found:
"patch-typescript.log",
`Failed to patch typescript.js - search string not found:
${search}`,
);
console.error(`Failed to patch tsserver.js - search string not found:
console.error(`Failed to patch typescript.js - search string not found:
${search}`);
process.exit(0);
}
fileContent = fileContent.replace(search, replace);
}

fs.writeFileSync(tsServerPath, fileContent);
fs.writeFileSync(tsLibPath, fileContent);
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@
"@dprint/json": "^0.19.3",
"@dprint/markdown": "^0.17.1",
"@dprint/typescript": "^0.91.1",
"@microsoft/api-extractor": "^7.43.0",
"@microsoft/api-extractor": "^7.47.0",
"@monorepo-utils/workspaces-to-typescript-project-references": "^2.10.4",
"@tsconfig/node18": "^18.2.4",
"@types/fs-extra": "^11.0.4",
"@types/node": "^18.19.31",
"@types/semver": "^7.5.8",
"@types/source-map-support": "^0.5.10",
"@typescript-eslint/eslint-plugin": "^7.5.0",
"@typescript-eslint/parser": "^7.5.0",
"@typescript-eslint/eslint-plugin": "^7.13.0",
"@typescript-eslint/parser": "^7.13.0",
"@zwave-js/cc": "workspace:*",
"@zwave-js/config": "workspace:*",
"@zwave-js/core": "workspace:*",
Expand All @@ -69,12 +69,12 @@
"cz-conventional-changelog": "^3.3.0",
"del-cli": "^5.1.0",
"dprint": "^0.46.3",
"esbuild": "0.20.2",
"esbuild": "0.21.5",
"esbuild-register": "^3.5.0",
"eslint": "^8.57.0",
"eslint-plugin-deprecation": "^2.0.0",
"eslint-plugin-unicorn": "^52.0.0",
"eslint-plugin-unused-imports": "^3.1.0",
"eslint-plugin-unused-imports": "^3.2.0",
"execa": "^5.1.1",
"fs-extra": "^11.2.0",
"husky": "^9.0.11",
Expand All @@ -85,9 +85,9 @@
"reflect-metadata": "^0.2.2",
"semver": "^7.6.2",
"source-map-support": "^0.5.21",
"ts-patch": "3.1.2",
"ts-patch": "3.2.1",
"turbo": "1.7.4",
"typescript": "5.4.4",
"typescript": "5.5.3",
"zwave-js": "workspace:*"
},
"resolutions": {
Expand Down Expand Up @@ -122,7 +122,7 @@
"commit": "git-cz",
"release": "release-script",
"release:all": "release-script --publish-all",
"postinstall": "ts-patch install -s && yarn node maintenance/patch-tsserver.js && yarn turbo run bootstrap",
"postinstall": "ts-patch install -s && yarn node maintenance/patch-typescript.js && yarn turbo run bootstrap",
"prepare": "husky && ts-patch install -s",
"config": "yarn ts packages/config/maintenance/importConfig.ts",
"docs": "docsify serve docs",
Expand All @@ -146,5 +146,5 @@
"path": "./node_modules/cz-conventional-changelog"
}
},
"packageManager": "[email protected].0"
"packageManager": "[email protected].1"
}
Loading

0 comments on commit 2a105e2

Please sign in to comment.