Skip to content

Commit

Permalink
feat(BREAKING): upgrade to TypeScript 5.4 (#1516)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Mar 9, 2024
1 parent 92962aa commit e7799eb
Show file tree
Hide file tree
Showing 14 changed files with 5,498 additions and 2,867 deletions.
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017-2023 David Sherret
Copyright (c) 2017 David Sherret

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
134 changes: 101 additions & 33 deletions deno/common/typescript.d.ts

Large diffs are not rendered by default.

6,833 changes: 4,590 additions & 2,243 deletions deno/common/typescript.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions deno/ts_morph.js
@@ -1,7 +1,7 @@
import { errors, SyntaxKind, ts, NewLineKind, EmitHint, ScriptTarget, ScriptKind, SettingsContainer, KeyValueCache, getCompilerOptionsFromTsConfig as getCompilerOptionsFromTsConfig$1, StringUtils, getSyntaxKindName, ArrayUtils, nameof, ObjectUtils, EventContainer, FileUtils, libFolderInMemoryPath, Memoize, SymbolFlags, TypeFormatFlags, getEmitModuleResolutionKind, createHosts, ObjectFlags, TypeFlags, matchGlobs, ModuleResolutionKind, SortedKeyValueArray, LocaleStringComparer, WeakCache, DocumentRegistry, createModuleResolutionHost, TransactionalFileSystem, TsConfigResolver, CompilerOptionsContainer, InMemoryFileSystemHost, RealFileSystemHost, IterableUtils, runtime } from './common/mod.ts';
export { CompilerOptionsContainer, DiagnosticCategory, EmitHint, InMemoryFileSystemHost, LanguageVariant, ModuleKind, ModuleResolutionKind, NewLineKind, NodeFlags, ObjectFlags, ResolutionHosts, ScriptKind, ScriptTarget, SettingsContainer, SymbolFlags, SyntaxKind, TypeFlags, TypeFormatFlags, ts } from './common/mod.ts';
import CodeBlockWriter from 'https://deno.land/x/code_block_writer@12.0.0/mod.ts';
export { default as CodeBlockWriter } from 'https://deno.land/x/code_block_writer@12.0.0/mod.ts';
import CodeBlockWriter from 'https://deno.land/x/code_block_writer@13.0.1/mod.ts';
export { default as CodeBlockWriter } from 'https://deno.land/x/code_block_writer@13.0.1/mod.ts';

class AdvancedIterator {
#iterator;
Expand Down
1,196 changes: 669 additions & 527 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/bootstrap/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017-2023 David Sherret
Copyright (c) 2017 David Sherret

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
14 changes: 7 additions & 7 deletions packages/bootstrap/package.json
Expand Up @@ -27,18 +27,18 @@
"@ts-morph/common": "~0.22.0"
},
"devDependencies": {
"@rollup/plugin-typescript": "^11.1.5",
"@types/chai": "^4.3.11",
"@rollup/plugin-typescript": "^11.1.6",
"@types/chai": "^4.3.12",
"@types/mocha": "^10.0.6",
"@types/node": "^20.10.0",
"@types/node": "^20.11.25",
"chai": "^4.3.10",
"cross-env": "^7.0.3",
"mocha": "^10.2.0",
"mocha": "^10.3.0",
"rimraf": "^5.0.5",
"rollup": "=4.5.2",
"ts-node": "^10.9.1",
"rollup": "=4.12.1",
"ts-node": "^10.9.2",
"tslib": "^2.6.2",
"typescript": "~5.3.2"
"typescript": "~5.4.2"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/common/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017-2023 David Sherret
Copyright (c) 2017 David Sherret

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
134 changes: 101 additions & 33 deletions packages/common/lib/typescript.d.ts

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions packages/common/package.json
Expand Up @@ -25,18 +25,18 @@
"path-browserify": "^1.0.1"
},
"devDependencies": {
"@rollup/plugin-typescript": "^11.1.5",
"@types/chai": "^4.3.11",
"@rollup/plugin-typescript": "^11.1.6",
"@types/chai": "^4.3.12",
"@types/mocha": "^10.0.6",
"@types/node": "^20.10.0",
"@types/node": "^20.11.25",
"chai": "^4.3.10",
"cross-env": "^7.0.3",
"mocha": "^10.2.0",
"mocha": "^10.3.0",
"rimraf": "^5.0.5",
"rollup": "=4.5.2",
"ts-node": "^10.9.1",
"rollup": "=4.12.1",
"ts-node": "^10.9.2",
"tslib": "^2.6.2",
"typescript": "5.3.2"
"typescript": "5.4.2"
},
"publishConfig": {
"access": "public"
Expand Down
5 changes: 4 additions & 1 deletion packages/common/scripts/buildDeno.ts
Expand Up @@ -45,7 +45,10 @@ fileSystem.mkdirSync(`${copyDirPath}/data`);
fileSystem.copySync(`${folderPath}/ts-morph-common.js`, `${copyDirPath}/ts_morph_common.js`);
fileSystem.copySync(`${folderPath}/DenoRuntime.ts`, `${copyDirPath}/DenoRuntime.ts`);

const tsNodeModulesLibDir = path.join(folders.root, "node_modules/typescript/lib/");
const localTsLibFolder = path.join(folders.common, "node_modules/typescript/lib");
const tsNodeModulesLibDir = fileSystem.directoryExistsSync(localTsLibFolder)
? localTsLibFolder
: path.join(folders.root, "node_modules/typescript/lib");
const typeScriptSourceFile = fileSystem.readFileSync(path.join(tsNodeModulesLibDir, "typescript.js"));
fileSystem.writeFileSync(`${copyDirPath}/typescript.js`, typeScriptSourceFile + "\nexport { ts };\n");
fileSystem.copySync(path.join(tsNodeModulesLibDir, "typescript.d.ts"), `${copyDirPath}/typescript.d.ts`);
Expand Down
5 changes: 4 additions & 1 deletion packages/common/scripts/bundleLocalTs.ts
Expand Up @@ -19,7 +19,10 @@ for (const varDecl of commonFile.getVariableDeclarations()) {

commonFile.saveSync();

const typescriptLibFolderPath = path.join(folders.root, "node_modules/typescript/lib");
const localTypescriptLibFolderPath = path.join(folders.common, "node_modules/typescript/lib");
const typescriptLibFolderPath = fileSystem.directoryExistsSync(localTypescriptLibFolderPath)
? localTypescriptLibFolderPath
: path.join(folders.root, "node_modules/typescript/lib");
fileSystem.copySync(path.join(typescriptLibFolderPath, "typescript.js"), "./dist/typescript.js");
fileSystem.copySync(path.join(typescriptLibFolderPath, "typescript.d.ts"), "./lib/typescript.d.ts");

Expand Down
2 changes: 1 addition & 1 deletion packages/ts-morph/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017-2023 David Sherret
Copyright (c) 2017 David Sherret

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
18 changes: 9 additions & 9 deletions packages/ts-morph/package.json
Expand Up @@ -45,22 +45,22 @@
"homepage": "https://github.com/dsherret/ts-morph#readme",
"dependencies": {
"@ts-morph/common": "~0.22.0",
"code-block-writer": "^12.0.0"
"code-block-writer": "^13.0.1"
},
"devDependencies": {
"@rollup/plugin-typescript": "^11.1.5",
"@types/chai": "^4.3.11",
"@types/diff": "^5.0.8",
"@rollup/plugin-typescript": "^11.1.6",
"@types/chai": "^4.3.12",
"@types/diff": "^5.0.9",
"@types/mocha": "^10.0.6",
"@types/node": "^20.10.0",
"@types/node": "^20.11.25",
"chai": "^4.3.10",
"conditional-type-checks": "^1.0.6",
"cross-env": "^7.0.3",
"diff": "^5.1.0",
"mocha": "10.2.0",
"diff": "^5.2.0",
"mocha": "10.3.0",
"rimraf": "^5.0.5",
"rollup": "=4.5.2",
"ts-node": "10.9.1",
"rollup": "=4.12.1",
"ts-node": "10.9.2",
"typescript": "~5.3.2"
},
"standard-version": {
Expand Down

0 comments on commit e7799eb

Please sign in to comment.