Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ts-morph

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-morph - npm Package Compare versions

Comparing version 4.3.3 to 5.0.0

69

package.json
{
"name": "ts-morph",
"version": "4.3.3",
"version": "5.0.0",
"description": "TypeScript compiler wrapper for static analysis and code manipulation.",

@@ -9,8 +9,8 @@ "main": "dist/ts-morph.js",

"dopublish": "yarn type-check-docs && yarn package && yarn publish-code-verification && echo \"Run: npm publish --otp\"",
"build": "rimraf dist && rollup --config",
"build": "rimraf dist && rollup --config && yarn build:declarations",
"build:declarations": "rimraf dist-declarations && ts-node --transpile-only scripts/generation/main create-declaration-file",
"format": "dprint",
"test": "cross-env TS_NODE_COMPILER=\"ttypescript\" TS_NODE_TRANSPILE_ONLY=\"true\" mocha --opts mocha.opts",
"test:debug": "cross-env TS_NODE_COMPILER=\"ttypescript\" TS_NODE_TRANSPILE_ONLY=\"true\" mocha --opts mocha.opts --inspect-brk",
"test:debug": "yarn test --inspect-brk",
"test:watch": "yarn test --watch-extensions ts --watch",
"test:ci": "yarn run test:coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
"test:ts-versions": "ts-node --transpile-only scripts/test/testTypeScriptVersions",

@@ -25,3 +25,3 @@ "test:coverage": "cross-env TS_NODE_COMPILER=\"ttypescript\" TS_NODE_TRANSPILE_ONLY=\"true\" nyc --reporter=lcov mocha --opts mocha.opts",

"output-wrapped-nodes": "ts-node --transpile-only scripts/generation/outputWrappedNodesInfo",
"package": "yarn build && yarn build:declarations",
"package": "yarn build",
"publish-code-verification": "yarn code-verification && yarn ensure-no-declaration-file-errors && yarn ensure-declaration-files-not-changed",

@@ -75,52 +75,37 @@ "code-verification": "ts-node --transpile-only scripts/verification/main ensure-structures-match-classes ensure-overload-structures-match ensure-array-inputs-readonly ensure-classes-implement-structure-methods ensure-mixin-not-applied-multiple-times validate-public-api-class-member-names validate-compiler-node-to-wrapped-type validate-code-fences",

"@dsherret/to-absolute-glob": "^2.0.2",
"chalk": "^2.4.2",
"code-block-writer": "^10.0.0",
"fs-extra": "^8.1.0",
"glob-parent": "^5.1.0",
"globby": "^10.0.1",
"is-negated-glob": "^1.0.0",
"multimatch": "^4.0.0",
"typescript": "3.0.1 - 3.6.4"
"@ts-morph/common": "~0.1.0",
"code-block-writer": "^10.0.0"
},
"devDependencies": {
"@types/chai": "^4.2.3",
"@types/chai": "^4.2.4",
"@types/diff": "^4.0.2",
"@types/fs-extra": "^8.0.0",
"@types/glob-parent": "^5.1.0",
"@types/globby": "^9.1.0",
"@types/is-negated-glob": "^1.0.0",
"@types/mocha": "^5.2.7",
"@types/multimatch": "^4.0.0",
"@types/node": "^12.7.8",
"@types/ts-nameof": "^3.2.0",
"@types/node": "^12.12.6",
"@types/ts-nameof": "^4.0.0",
"@ts-morph/scripts": "~0.1.0",
"chai": "^4.2.0",
"conditional-type-checks": "^1.0.1",
"coveralls": "^3.0.6",
"cross-env": "^6.0.0",
"conditional-type-checks": "^1.0.4",
"coveralls": "^3.0.7",
"cross-env": "^6.0.3",
"diff": "^4.0.1",
"dprint": "^0.7.3",
"dprint-plugin-jsonc": "^0.2.4",
"dprint-plugin-typescript": "^0.10.0",
"mocha": "6.2.1",
"mocha": "6.2.2",
"nyc": "14.1.1",
"rimraf": "^3.0.0",
"rollup": "^1.22.0",
"rollup-plugin-typescript2": "^0.24.3",
"rollup": "^1.26.3",
"rollup-plugin-typescript2": "^0.25.2",
"shelljs": "^0.8.3",
"shx": "^0.3.2",
"source-map-support": "^0.5.13",
"ts-morph": "4.1.0",
"ts-nameof": "^4.0.3",
"source-map-support": "^0.5.16",
"ts-morph": "npm:ts-morph@4.2.0",
"ts-nameof": "^4.1.0",
"ts-node": "8.4.1",
"ttypescript": "1.5.7",
"typescript": "3.6.3",
"typescript-3.0.1": "npm:typescript@3.0.1",
"typescript-3.0.3": "npm:typescript@3.0.3",
"typescript-3.1.6": "npm:typescript@3.1.6",
"typescript-3.2.4": "npm:typescript@3.2.4",
"typescript-3.3.3": "npm:typescript@3.3.3",
"typescript-3.4.5": "npm:typescript@3.4.5"
"ttypescript": "1.5.8",
"typescript": "3.7.2"
},
"standard-version": {
"tagPrefix": ""
"tagPrefix": "",
"skip": {
"tag": true,
"commit": true
}
},

@@ -127,0 +112,0 @@ "browser": {

@@ -9,31 +9,35 @@ ts-morph

[TypeScript](https://github.com/Microsoft/TypeScript) Compiler API wrapper. Provides an easier way to navigate and manipulate TypeScript and JavaScript code.
[TypeScript](https://github.com/Microsoft/TypeScript) Compiler API wrapper. Provides an easier way to programmatically navigate and manipulate TypeScript and JavaScript code.
Formerly `ts-simple-ast`.
## Library Development - Progress Update (03 September 2019)
## Overview
v4.0 is now released! Always review [breaking-changes.md](breaking-changes.md) before upgrading and see the [changelog](CHANGELOG.md) for information on new features.
* [Documentation](https://ts-morph.com/)
* [Declaration file](lib/ts-morph.d.ts)
This library is still under active development. Most common code manipulation/generation use cases are implemented, but there's still a lot of work to do.
## Main Features
Please open an issue if you find a feature missing, bug, or question that isn't in the issue tracker.
1. Wraps the compiler API objects to provide helper methods for getting information and programmatically changing files.
2. Allows falling back to the compiler API objects if necessary (ex. `classDeclaration.compilerNode` or `typeChecker.compilerObject`).
3. All changes are kept in memory (including file and directory moves) until specifying to save to the underlying file system.
4. Changes are made to the text and wrapped nodes can be held onto between manipulations.
### Report
## Getting Started
View a generated report on what nodes have been wrapped in the [wrapped-nodes.md](wrapped-nodes.md) file.
1. [Installing](https://ts-morph.com/)
2. [Instantiating](https://ts-morph.com/setup/)
3. [Adding source files](https://ts-morph.com/setup/adding-source-files)
4. [Getting source files](https://ts-morph.com/navigation/getting-source-files)
5. [Navigating](https://ts-morph.com/navigation/example)
6. [Manipulating](https://ts-morph.com/manipulation/)
## Documentation
## Library Progress
Work in progress: https://dsherret.github.io/ts-morph/
This library is still under active development. Most common code manipulation/generation use cases are implemented, but there's still a lot of work to do. Please open an issue if you find a feature missing, bug, or question that isn't in the issue tracker.
## Getting Started
* [Breaking changes](breaking-changes.md)
* [Change log](CHANGELOG.md)
* [Wrapped nodes progress report](wrapped-nodes.md)
1. [Installing](https://dsherret.github.io/ts-morph/)
2. [Instantiating](https://dsherret.github.io/ts-morph/setup/)
3. [Adding source files](https://dsherret.github.io/ts-morph/setup/adding-source-files)
4. [Getting source files](https://dsherret.github.io/ts-morph/navigation/getting-source-files)
5. [Navigating](https://dsherret.github.io/ts-morph/navigation/example)
6. [Manipulating](https://dsherret.github.io/ts-morph/manipulation/)
## Example

@@ -49,3 +53,3 @@

// with the associated source files.
// Read more: https://dsherret.github.io/ts-morph/setup/
// Read more: https://ts-morph.com/setup/
});

@@ -91,3 +95,3 @@

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

@@ -112,5 +116,1 @@ // get underlying compiler node from the typescript AST from any node

```
## Resources
* [AST Viewers](https://dsherret.github.io/ts-morph/setup/ast-viewers)

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc