Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dsherret/ts-morph
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 17.0.1
Choose a base ref
...
head repository: dsherret/ts-morph
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 18.0.0
Choose a head ref
  • 7 commits
  • 80 files changed
  • 4 contributors

Commits on Dec 8, 2022

  1. Copy the full SHA
    42d811e View commit details

Commits on Mar 16, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    dc1c1b4 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d58f238 View commit details

Commits on Mar 22, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b4ce145 View commit details

Commits on Mar 28, 2023

  1. 18.0.0 (#1395)

    dsherret authored Mar 28, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    069ea9a View commit details
  2. chore: update changelog.

    dsherret committed Mar 28, 2023
    Copy the full SHA
    b505521 View commit details
  3. chore: fix publish

    dsherret committed Mar 28, 2023
    Copy the full SHA
    c126733 View commit details
Showing with 174,441 additions and 194,934 deletions.
  1. +14 −7 .github/workflows/ci.yml
  2. +8 −1 .vscode/settings.json
  3. +1 −1 LICENSE
  4. +1 −1 deno/basic_test.ts
  5. +1 −1 deno/bootstrap/basic_test.ts
  6. +1 −1 deno/bootstrap/ts_morph_bootstrap.js
  7. +6 −3 deno/common/DenoRuntime.ts
  8. +1 −3 deno/common/ts_morph_common.d.ts
  9. +94 −96 deno/common/ts_morph_common.js
  10. +1,325 −2,318 deno/common/typescript.d.ts
  11. +168,945 −173,639 deno/common/typescript.js
  12. +166 −457 deno/ts_morph.d.ts
  13. +73 −28 deno/ts_morph.js
  14. +1 −1 docs/manipulation/transforms.md
  15. +3 −3 dprint.json
  16. +0 −12 lerna.json
  17. +1,770 −11,970 package-lock.json
  18. +9 −8 package.json
  19. +1 −1 packages/bootstrap/LICENSE
  20. +15 −9 packages/bootstrap/package.json
  21. +2 −1 packages/bootstrap/rollup.config.mjs
  22. +5 −1 packages/bootstrap/scripts/buildDeclarations.ts
  23. +1 −1 packages/bootstrap/src/Project.ts
  24. +1 −1 packages/common/LICENSE
  25. +1 −3 packages/common/lib/ts-morph-common.d.ts
  26. +1,325 −2,318 packages/common/lib/typescript.d.ts
  27. +0 −2,930 packages/common/package-lock.json
  28. +12 −11 packages/common/package.json
  29. +2 −1 packages/common/rollup.config.mjs
  30. +4 −3 packages/common/scripts/buildDeno.ts
  31. +4 −3 packages/common/scripts/bundleLocalTs.ts
  32. +2 −2 packages/common/scripts/createLibFile.ts
  33. +1 −1 packages/common/scripts/deps.ts
  34. +88 −79 packages/common/src/data/libFiles.ts
  35. +6 −8 packages/common/src/fileSystem/TransactionalFileSystem.ts
  36. +5 −3 packages/common/src/runtimes/DenoRuntime.ts
  37. +0 −13 packages/common/src/utils/ArrayUtils.ts
  38. +2 −2 packages/scripts/deps.ts
  39. +19 −0 packages/ts-morph/CHANGELOG.md
  40. +1 −1 packages/ts-morph/LICENSE
  41. +166 −457 packages/ts-morph/lib/ts-morph.d.ts
  42. +1 −1 packages/ts-morph/package-lock.json
  43. +11 −11 packages/ts-morph/package.json
  44. +2 −2 packages/ts-morph/rollup.config.mjs
  45. +1 −1 packages/ts-morph/scripts/generation/createNodeTypeGuards.ts
  46. +6 −6 packages/ts-morph/src/compiler/ast/base/AwaitableNode.ts
  47. +6 −1 packages/ts-morph/src/compiler/ast/base/DecoratableNode.ts
  48. +4 −4 packages/ts-morph/src/compiler/ast/base/ModifierableNode.ts
  49. +7 −1 packages/ts-morph/src/compiler/ast/base/TypedNode.ts
  50. +8 −8 packages/ts-morph/src/compiler/ast/class/ClassDeclaration.ts
  51. +1 −1 packages/ts-morph/src/compiler/ast/class/base/ClassLikeDeclarationBase.ts
  52. +1 −0 packages/ts-morph/src/compiler/ast/comment/CompilerComments.ts
  53. +129 −452 packages/ts-morph/src/compiler/ast/common/Node.ts
  54. +8 −0 packages/ts-morph/src/compiler/ast/doc/JSDocOverloadTag.ts
  55. +10 −0 packages/ts-morph/src/compiler/ast/doc/JSDocSatisfiesTag.ts
  56. +10 −0 packages/ts-morph/src/compiler/ast/doc/JSDocThrowsTag.ts
  57. +3 −0 packages/ts-morph/src/compiler/ast/doc/index.ts
  58. +2 −2 packages/ts-morph/src/compiler/ast/function/OverloadableNode.ts
  59. +3 −5 packages/ts-morph/src/compiler/ast/interface/InterfaceDeclaration.ts
  60. +3 −0 packages/ts-morph/src/compiler/ast/kindToNodeMappings.ts
  61. +16 −2 packages/ts-morph/src/compiler/ast/type/TypeParameterDeclaration.ts
  62. +3 −3 packages/ts-morph/src/compiler/symbols/Symbol.ts
  63. +3 −0 packages/ts-morph/src/factories/kindToWrapperMappings.ts
  64. +4 −2 packages/ts-morph/src/fileSystem/Directory.ts
  65. +2 −0 packages/ts-morph/src/structurePrinters/types/TypeParameterDeclarationStructurePrinter.ts
  66. +1 −0 packages/ts-morph/src/structures/type/TypeParameterDeclarationStructure.ts
  67. +1 −1 packages/ts-morph/src/tests/compiler/ast/base/childOrderableNodeTests.ts
  68. +17 −0 packages/ts-morph/src/tests/compiler/ast/base/decoratableNodeTests.ts
  69. +2 −1 packages/ts-morph/src/tests/compiler/ast/base/typeParameteredNodeTests.ts
  70. +8 −0 packages/ts-morph/src/tests/compiler/ast/base/typedNodeTests.ts
  71. +6 −4 packages/ts-morph/src/tests/compiler/ast/class/classDeclarationTests.ts
  72. +2 −2 packages/ts-morph/src/tests/compiler/ast/common/nodeTests.ts
  73. +14 −1 packages/ts-morph/src/tests/compiler/ast/decorator/decoratorTests.ts
  74. +1 −1 packages/ts-morph/src/tests/compiler/ast/general/heritageClauseTests.ts
  75. +1 −1 packages/ts-morph/src/tests/compiler/ast/name/computedPropertyNameTests.ts
  76. +2 −2 packages/ts-morph/src/tests/compiler/ast/name/privateIdentifierTests.ts
  77. +41 −1 packages/ts-morph/src/tests/compiler/ast/type/typeParameterDeclarationTests.ts
  78. +1 −0 packages/ts-morph/src/tests/compiler/testHelpers/fillStructureWithDefaults.ts
  79. +1 −1 packages/ts-morph/src/tests/issues/0708tests.ts
  80. +17 −18 packages/ts-morph/wrapped-nodes.md
21 changes: 14 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
name: CI

on: [push, pull_request]
on:
pull_request:
branches:
- latest
push:
branches:
- latest
tags:
- '*'

jobs:
build:
@@ -16,15 +24,14 @@ jobs:
- name: Build
run: |
npm ci
npm run bootstrap
npm run build
npx lerna run ensure-no-project-compile-errors
npm run --workspaces build
npm run --workspaces --if-present ensure-no-project-compile-errors
- name: Test
run: |
npx lerna run test:ci
npx lerna run test:ts-versions
npm run --workspaces --if-present test:ci
npm run --workspaces --if-present test:ts-versions
- name: Deno Test
run: deno test --allow-read deno
- name: Code Verification
run: |
npx lerna run code-verification
npm run --workspaces --if-present code-verification
9 changes: 8 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
{
"prettier.enable": false
"prettier.enable": false,
"deno.enablePaths": [
"deno",
"packages/bootstrap/scripts/",
"packages/common/scripts/",
"packages/scripts/",
"packages/ts-morph/scripts/"
]
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017-2022 David Sherret
Copyright (c) 2017-2023 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
2 changes: 1 addition & 1 deletion deno/basic_test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals } from "https://deno.land/std@0.140.0/testing/asserts.ts";
import { assertEquals } from "https://deno.land/std@0.181.0/testing/asserts.ts";
import { Project } from "./mod.ts";

// todo: Eventually all tests run for the node package should also be run for Deno
2 changes: 1 addition & 1 deletion deno/bootstrap/basic_test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals } from "https://deno.land/std@0.140.0/testing/asserts.ts";
import { assertEquals } from "https://deno.land/std@0.181.0/testing/asserts.ts";
import { createProjectSync } from "./mod.ts";

// todo: Eventually all tests run for the node package should also be run for Deno
2 changes: 1 addition & 1 deletion deno/bootstrap/ts_morph_bootstrap.js
Original file line number Diff line number Diff line change
@@ -218,7 +218,7 @@ class Project {
fileGlobs = [fileGlobs];
const sourceFilePromises = [];
const sourceFiles = [];
for await (const filePath of this._fileSystemWrapper.glob(fileGlobs)) {
for (const filePath of await this._fileSystemWrapper.glob(fileGlobs)) {
sourceFilePromises.push(this.addSourceFileAtPathIfExists(filePath).then(sourceFile => {
if (sourceFile != null)
sourceFiles.push(sourceFile);
9 changes: 6 additions & 3 deletions deno/common/DenoRuntime.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { ensureDir, ensureDirSync } from "https://deno.land/std@0.140.0/fs/ensure_dir.ts";
import { expandGlob, expandGlobSync } from "https://deno.land/std@0.140.0/fs/expand_glob.ts";
import * as stdPath from "https://deno.land/std@0.140.0/path/mod.ts";
import { ensureDir, ensureDirSync } from "https://deno.land/std@0.181.0/fs/ensure_dir.ts";
import { expandGlob, expandGlobSync } from "https://deno.land/std@0.181.0/fs/expand_glob.ts";
import * as stdPath from "https://deno.land/std@0.181.0/path/mod.ts";

// deno-lint-ignore no-explicit-any

export class DenoRuntime {
fs = new DenoRuntimeFileSystem();
@@ -100,6 +102,7 @@ class DenoRuntimeFileSystem {
return this._toStat(stat);
}

// deno-lint-ignore no-explicit-any
private _toStat(stat: any) {
return {
isFile() {
4 changes: 1 addition & 3 deletions deno/common/ts_morph_common.d.ts
Original file line number Diff line number Diff line change
@@ -820,7 +820,7 @@ export declare class TransactionalFileSystem {
readFile(filePath: StandardizedFilePath, encoding: string | undefined): Promise<string>;
private _verifyCanReadFile;
readDirSync(dirPath: StandardizedFilePath): DirEntry[];
glob(patterns: ReadonlyArray<string>): AsyncGenerator<StandardizedFilePath, void, unknown>;
glob(patterns: ReadonlyArray<string>): Promise<StandardizedFilePath[]>;
globSync(patterns: ReadonlyArray<string>): Generator<StandardizedFilePath, void, unknown>;
getFileSystem(): FileSystemHost;
getCurrentDirectory(): StandardizedFilePath;
@@ -1017,8 +1017,6 @@ export declare class ArrayUtils {
static getUniqueItems<T>(a: ReadonlyArray<T>): T[];
static removeFirst<T>(a: T[], item: T): boolean;
static removeAll<T>(a: T[], isMatch: (item: T) => boolean): T[];
static flatten<T>(items: T[][]): T[];
static from<T>(items: ts.Iterator<T>): T[];
static toIterator<T>(items: ReadonlyArray<T>): Generator<T, void, unknown>;
static sortByProperty<T>(items: T[], getProp: (item: T) => string | number): T[];
static groupBy<T>(items: ReadonlyArray<T>, getGroup: (item: T) => string | number): T[][];
190 changes: 94 additions & 96 deletions deno/common/ts_morph_common.js

Large diffs are not rendered by default.

Loading