astx
Version:
super powerful structural search and replace for JavaScript and TypeScript to automate your refactoring
233 lines (232 loc) • 7.26 kB
JSON
{
"name": "astx",
"version": "2.2.3",
"description": "super powerful structural search and replace for JavaScript and TypeScript to automate your refactoring",
"bin": {
"astx": "./cjs/cli/index.js"
},
"exports": {
"./package.json": "./package.json",
".": {
"import": "./mjs/index.mjs",
"require": "./cjs/index.js",
"types": "./types/index.d.ts"
},
"./node": {
"import": "./mjs/node/index.mjs",
"require": "./cjs/node/index.js",
"types": "./types/node/index.d.ts"
},
"./cli": {
"import": "./mjs/cli/index.mjs",
"require": "./cjs/cli/index.js",
"types": "./types/cli/index.d.ts"
}
},
"files": [
"mjs",
"cjs",
"types"
],
"astx": {
"parser": "babel",
"workers": 1
},
"main": "./cjs/index.js",
"types": "./types/index.d.ts",
"sideEffects": false,
"scripts": {
"cli": "babel-node --extensions .ts src/cli/index.ts",
"lint": "eslint $npm_package_config_lint",
"lint:fix": "eslint $npm_package_config_lint",
"prettier": "prettier --write $npm_package_config_prettier",
"prettier:check": "prettier --list-different $npm_package_config_prettier",
"tsc": "tsc",
"tsc:watch": "npm run tsc -- --watch",
"clean": "rimraf mjs cjs types",
"build": "npm run clean && npm run build:types && npm run build:cjs && npm run check:cjs && npm run build:mjs && npm run check:mjs",
"build:types": "tsc -p tsconfig.build.json && mkdir -p cjs && copy 'src/**/*.js.flow' cjs && mkdir -p mjs && copy 'src/**/*.js.flow' mjs",
"build:cjs": "cross-env BABEL_ENV=es5 babel src --out-dir cjs --extensions .ts && babel-node --extensions .ts src/cli/index.ts -t convertCjsBuild.ts --parser babel --no-gitignore -y cjs",
"check:cjs": "node cjs/cli/index.js -f 'export type TransformOptions = $T' 'src/**/*.ts'",
"build:mjs": "cross-env OUTPUT_ESM=1 babel src --out-dir mjs --out-file-extension .mjs --extensions .ts --source-maps inline && babel-node --extensions .ts src/cli/index.ts -t convertMjsBuild.ts --parser babel --no-gitignore -y mjs",
"check:mjs": "node mjs/cli/index.mjs -f 'export type TransformOptions = $T' 'src/**/*.ts'",
"test": "cross-env NODE_ENV=test BABEL_ENV=coverage nyc --reporter=lcov --reporter=text mocha $npm_package_config_mocha",
"test:watch": "cross-env NODE_ENV=test BABEL_ENV=test mocha $npm_package_config_mocha --watch",
"test:debug": "cross-env NODE_ENV=test BABEL_ENV=test mocha --inspect-brk $npm_package_config_mocha",
"codecov": "nyc report --reporter=text-lcov > coverage.lcov; codecov",
"prepublishOnly": "npm run clean && npm run prettier:check && npm run lint && npm test && npm run build",
"open:coverage": "open coverage/lcov-report/index.html",
"semantic-release": "semantic-release"
},
"release": {
"branches": [
"main",
{
"name": "beta",
"prerelease": true
}
]
},
"config": {
"lint": "--cache --ext .js,.ts src test",
"mocha": "--extension js --extension ts test/configure.js 'src/**/*.spec.ts' 'test/**/*.ts'",
"prettier": ".babelrc.js *.{json,md} {src,test}/**/*.{js,ts,flow}",
"commitizen": {
"path": "cz-conventional-changelog"
}
},
"husky": {
"hooks": {
"pre-commit": "lint-staged && npm run lint && npm run tsc",
"commit-msg": "commitlint -e $GIT_PARAMS",
"pre-push": "npm test"
}
},
"lint-staged": {
"*.{js,ts,json,css,md,flow}": [
"prettier --write"
]
},
"commitlint": {
"extends": [
"@jedwards1211/commitlint-config"
]
},
"prettier": {
"semi": false,
"singleQuote": true,
"trailingComma": "es5"
},
"nyc": {
"include": [
"src/**/*.ts"
],
"exclude": [
"src/**/*.spec.ts"
],
"require": [
"@babel/register"
],
"sourceMap": false,
"instrument": false
},
"repository": {
"type": "git",
"url": "https://github.com/codemodsquad/astx.git"
},
"keywords": [
"ast",
"automated",
"codemod",
"find",
"javascript",
"match",
"matching",
"pattern",
"refactor",
"refactoring",
"replace",
"rewrite",
"rewriting",
"search",
"semantic",
"structural",
"syntax",
"transform",
"transformation",
"typescript"
],
"author": "Andy Edwards",
"license": "MIT",
"bugs": {
"url": "https://github.com/codemodsquad/astx/issues"
},
"homepage": "https://github.com/codemodsquad/astx#readme",
"devDependencies": {
"@babel/cli": "^7.12.10",
"@babel/core": "^7.18.13",
"@babel/node": "^7.13.13",
"@babel/plugin-transform-runtime": "^7.12.10",
"@babel/preset-env": "^7.18.10",
"@babel/preset-typescript": "^7.18.6",
"@babel/register": "^7.18.9",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@jedwards1211/commitlint-config": "^1.0.2",
"@jedwards1211/eslint-config": "^2.0.2",
"@jedwards1211/eslint-config-typescript": "^2.0.2",
"@types/babel__code-frame": "^7.0.3",
"@types/babel__generator": "^7.6.3",
"@types/babel__parser": "^7.1.1",
"@types/chai": "^4.2.14",
"@types/chai-as-promised": "^7.1.5",
"@types/chai-subset": "^1.3.3",
"@types/debug": "^4.1.5",
"@types/diff": "^5.0.0",
"@types/fs-extra": "^9.0.6",
"@types/glob": "^8.0.0",
"@types/inquirer": "^7.3.1",
"@types/lodash": "^4.14.165",
"@types/minimatch": "^5.1.2",
"@types/mocha": "^8.2.0",
"@types/node": "^14.14.22",
"@types/prettier": "^2.2.2",
"@types/resolve": "^1.17.1",
"@types/shallowequal": "^1.1.1",
"@types/yargs": "^17.0.13",
"@typescript-eslint/eslint-plugin": "^4.14.1",
"@typescript-eslint/parser": "^4.14.1",
"@typescript-eslint/typescript-estree": "^4.14.1",
"ansi-escapes": "^4.0.0",
"babel-eslint": "^10.1.0",
"babel-plugin-istanbul": "^6.0.0",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"chai-subset": "^1.6.0",
"codecov": "^3.8.1",
"copy": "^0.3.2",
"cross-env": "^7.0.3",
"eslint": "^7.18.0",
"eslint-config-prettier": "^7.2.0",
"flow-bin": "^0.144.0",
"husky": "^4.3.8",
"istanbul": "^0.4.5",
"lint-staged": "^10.5.3",
"mocha": "^10.1.0",
"nyc": "^15.1.0",
"prettier": "^2.2.1",
"prettier-eslint": "^12.0.0",
"require-glob": "^3.2.0",
"rimraf": "^3.0.2",
"semantic-release": "^17.3.7",
"ts-node": "^9.1.1",
"typescript": "^4.7.4"
},
"dependencies": {
"@babel/code-frame": "^7.18.6",
"@babel/generator": "^7.18.13",
"@babel/parser": "^7.18.13",
"@babel/runtime": "^7.18.9",
"@babel/types": "^7.18.13",
"ast-types": "^0.14.2",
"babel-parse-wild-code": "^2.1.3",
"chalk": "^4.1.0",
"cosmiconfig": "^7.0.1",
"debug": "^4.3.1",
"dedent-js": "^1.0.1",
"diff": "^5.0.0",
"fs-extra": "^9.0.1",
"gitignore-fs": "^2.2.0",
"inquirer": "^7.3.3",
"lodash": "^4.17.20",
"lodash-es": "^4.17.21",
"minimatch": "^5.1.0",
"p-event": "^4.0.0",
"recast": "^0.21.2",
"resolve": "^1.19.0",
"shallowequal": "^1.1.0",
"tiny-typed-emitter": "^2.1.0",
"typed-validators": "^4.5.1",
"yargs": "^17.6.2"
}
}