Skip to content

Commit

Permalink
chore: Update for TS 3.8.
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Feb 23, 2020
1 parent 24fd051 commit 47910f3
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 163 deletions.
2 changes: 1 addition & 1 deletion docs/details/source-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ project.getSourceFileOrThrow("someFile.ts").delete();
project.getSourceFileOrThrow("someOtherFile.ts").delete();

// after you're all done, finally save your changes to the file system
project.save();
await project.save();
```

#### Deleting Immediately
Expand Down
2 changes: 1 addition & 1 deletion docs/emitting.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ for (const file of result.getFiles()) {
// ...manipulate the javascript files here...

// save the new files to the file system
newProject.save();
await newProject.save();
```

...but consider using the custom transformers discussed above if you want it to be faster.
2 changes: 1 addition & 1 deletion docs/manipulation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const project = new Project();
// ...lots of code here that manipulates, copies, moves, and deletes files...

// when you're all done, call this and it will save everything to the file system
project.save();
await project.save();
```

The above is recommended because it means if your code errors halfway through, the files won't be in a halfway state. However, there's always a way to save, move, copy, and delete while immediately having these changes happen on the underlying file system. For example:
Expand Down
2 changes: 1 addition & 1 deletion docs/setup/adding-source-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,5 @@ Adding source files to the project from a structure, writer function, or text wi

```ts
// save it to the disk if you wish:
sourceFile.save(); // or saveSync();
await sourceFile.save(); // or saveSync();
```
2 changes: 1 addition & 1 deletion packages/bootstrap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"ts-nameof": "^4.2.2",
"ts-node": "^8.6.2",
"ttypescript": "^1.5.10",
"typescript": "^3.7.5"
"typescript": "~3.8.2"
},
"publishConfig": {
"access": "public"
Expand Down
6 changes: 5 additions & 1 deletion packages/bootstrap/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1000,10 +1000,14 @@ type-detect@^4.0.0, type-detect@^4.0.5:
version "4.0.8"
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c"

typescript@^3.5.3, typescript@^3.7.5, typescript@~3.7.2:
typescript@^3.5.3, typescript@~3.7.2:
version "3.7.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.5.tgz#0692e21f65fd4108b9330238aac11dd2e177a1ae"

typescript@~3.8.2:
version "3.8.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.2.tgz#91d6868aaead7da74f493c553aeff76c0c0b1d5a"

unc-path-regex@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa"
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"fs-extra": "^8.1.0",
"is-negated-glob": "^1.0.0",
"multimatch": "^4.0.0",
"typescript": "3.9.0-dev.20200215"
"typescript": "~3.8.2"
},
"devDependencies": {
"@ts-morph/scripts": "~0.2.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/common/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1020,14 +1020,14 @@ type-detect@^4.0.0, type-detect@^4.0.5:
version "4.0.8"
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c"

[email protected]:
version "3.9.0-dev.20200215"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.0-dev.20200215.tgz#6bf2b4e8241582541c915032dd0f6a535f46adeb"

typescript@^3.5.3, typescript@~3.7.2:
version "3.7.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.5.tgz#0692e21f65fd4108b9330238aac11dd2e177a1ae"

typescript@~3.8.2:
version "3.8.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.2.tgz#91d6868aaead7da74f493c553aeff76c0c0b1d5a"

unc-path-regex@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa"
Expand Down
2 changes: 1 addition & 1 deletion packages/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"rollup-plugin-typescript2": "^0.26.0",
"ts-nameof": "^4.2.2",
"ttypescript": "^1.5.10",
"typescript": "^3.7.5"
"typescript": "~3.8.2"
},
"publishConfig": {
"access": "public"
Expand Down
6 changes: 5 additions & 1 deletion packages/scripts/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,14 @@ ttypescript@^1.5.10:
dependencies:
resolve "^1.9.0"

typescript@^3.5.3, typescript@^3.7.5, typescript@~3.7.2:
typescript@^3.5.3, typescript@~3.7.2:
version "3.7.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.5.tgz#0692e21f65fd4108b9330238aac11dd2e177a1ae"

typescript@~3.8.2:
version "3.8.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.2.tgz#91d6868aaead7da74f493c553aeff76c0c0b1d5a"

unc-path-regex@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa"
Expand Down
2 changes: 1 addition & 1 deletion packages/ts-morph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"ts-nameof": "^4.2.2",
"ts-node": "8.6.2",
"ttypescript": "1.5.10",
"typescript": "3.7.5"
"typescript": "~3.8.2"
},
"standard-version": {
"tagPrefix": "",
Expand Down
2 changes: 1 addition & 1 deletion packages/ts-morph/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ myClass.addProperty({
project.getSourceFileOrThrow("src/ExistingFile.ts").delete();

// asynchronously save all the changes above
project.save().then(() => console.log("Saved!"));
await project.save();

// get underlying compiler node from the typescript AST from any node
const compilerNode = myClassFile.compilerNode;
Expand Down
Loading

0 comments on commit 47910f3

Please sign in to comment.