-
Notifications
You must be signed in to change notification settings - Fork 4
/
package.json
93 lines (93 loc) · 3.84 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
{
"name": "@nick.heiner/jscodemod",
"version": "3.0.0-4",
"description": "JS codemod runner",
"homepage": "https://github.com/NickHeiner/jscodemod",
"main": "build/index.js",
"types": "build/index.d.ts",
"repository": "git@github.com:NickHeiner/jscodemod.git",
"author": "Nick Heiner <nth23@cornell.edu>",
"files": [
"build",
"docs",
"README.md"
],
"license": "MIT",
"bin": "./build/bin.js",
"scripts": {
"jscodemod": "./build/bin.js",
"build": "rm -rf build && tsc && chmod a+x ./build/bin.js",
"format": "prettier --write \"{src,__tests__,docs}/**/*.{js,ts,.md}\"",
"format-check": "prettier --check \"{src,__tests__,docs}/**/*.{js,ts,.md}\"",
"demo": "yarn build && yarn jscodemod --codemod fixtures/prepend-string/codemod.js fixtures/prepend-string/source",
"demo:ai": "yarn build && yarn jscodemod --prompt \"The Javascript code above is written in ES5. Transform it to ES6. Include only the transformed code; do not include any other comments, context, or metadata. Do not create new comments. Make sure to apply the following transformations: 1. Use optional chaining. 2. Use the object property shorthand.\" fixtures/ai/source/es5.js --resetDirtyInputFiles",
"demo:ai:multiple": "yarn build && yarn jscodemod --prompt \"Above, we have uncommented JavaScript file. Below, we have the same file, but with JSDoc comments:\" fixtures/ai/source/*.js --resetDirtyInputFiles",
"demo:ai:react": "yarn build && yarn jscodemod --prompt \"Above, we have a React class component. Convert it to be a functional component, which uses hooks instead of this.setState and the lifecycle methods. Only return a single example. Do not include any other comments or prose.\" fixtures/ai/source/react-component.js --resetDirtyInputFiles",
"demo:ai:file_prompt": "yarn build && yarn jscodemod --promptFile fixtures/ai/codemod/add-exports.md fixtures/ai/source/export.js --resetDirtyInputFiles && yarn jscodemod --promptFile fixtures/ai/codemod/remove-exports.md fixtures/ai/source/export.js",
"unit": "jest",
"test": "yarn lint && yarn format-check && yarn build && yarn unit",
"lint": "eslint __tests__ src benchmark --max-warnings 0 --cache",
"lint:fix": "yarn lint --fix",
"prepublish": "yarn build"
},
"prettier": {
"printWidth": 100,
"useTabs": false,
"singleQuote": true,
"arrowParens": "avoid"
},
"devDependencies": {
"@babel/plugin-syntax-pipeline-operator": "7.18.6",
"@babel/plugin-transform-typescript": "7.20.2",
"@babel/preset-env": "7.20.2",
"@babel/preset-typescript": "7.18.6",
"@types/jest": "26.0.14",
"@types/lodash": "4.14.161",
"@types/progress": "2.0.3",
"@typescript-eslint/eslint-plugin": "5.47.0",
"@typescript-eslint/parser": "5.47.0",
"babel-jest": "29.3.1",
"benchmark": "2.1.4",
"cli-table3": "0.6.0",
"envinfo": "7.8.1",
"eslint": "8.30.0",
"eslint-config-nth": "2.0.1",
"eslint-plugin-jest": "27.1.7",
"git-root": "1.0.0",
"jest": "29.3.1",
"jscodeshift": "0.11.0",
"ncp": "2.0.0",
"prettier": "^2.8.4",
"resolve-bin": "0.4.0",
"sanitize-filename": "1.6.3",
"strip-ansi": "6.0.0",
"type-fest": "3.4.0",
"typescript": "4.9.4",
"utility-types": "3.10.0"
},
"dependencies": {
"@babel/core": "^7.20.5",
"@nick.heiner/gpt-3-encoder": "^1.2.0",
"ansi-colors": "4.1.1",
"core-js": "^3.26.1",
"execa": "5.1.1",
"find-up": "5.0.0",
"globby": "11.0.1",
"ignore": "5.1.8",
"jsonc-parser": "3.0.0",
"load-json-file": "6.2.0",
"lodash": "4.17.20",
"loud-rejection": "2.2.0",
"nth-log": "2.0.3",
"openai": "^3.2.1",
"ora": "5.1.0",
"p-debounce": "^2.1.0",
"piscina": "1.6.3",
"pretty-error": "3.0.4",
"pretty-ms": "7.0.1",
"progress": "2.0.3",
"recast": "0.20.4",
"tempy": "0.7.1",
"yargs": "17.6.2"
}
}