├── .changeset ├── README.md └── config.json ├── .editorconfig ├── .eslintignore ├── .eslintrc ├── .gitattributes ├── .github └── workflows │ ├── cr.yml │ ├── pull_request.yml │ ├── push.yml │ └── test.yml ├── .gitignore ├── .node-version ├── .npmignore ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── bin ├── __tests__ │ └── jscodeshift-test.js ├── jscodeshift.js └── jscodeshift.sh ├── index.js ├── package.json ├── parser ├── __tests__ │ ├── .eslintrc │ ├── __snapshots__ │ │ └── tsx-test.js.snap │ └── tsx-test.js ├── babel5Compat.js ├── babylon.js ├── flow.js ├── ts.js ├── tsOptions.js └── tsx.js ├── recipes └── retain-first-comment.md ├── sample ├── __testfixtures__ │ ├── reverse-identifiers.input.js │ ├── reverse-identifiers.output.js │ └── typescript │ │ ├── reverse-identifiers.input.ts │ │ └── reverse-identifiers.output.ts ├── __tests__ │ ├── __snapshots__ │ │ └── reverse-identifiers-test.js.snap │ └── reverse-identifiers-test.js └── reverse-identifiers.js ├── src ├── Collection.js ├── Runner.js ├── Worker.js ├── __testfixtures__ │ ├── test-async-transform.input.js │ ├── test-async-transform.js │ ├── test-async-transform.output.js │ ├── test-sync-transform.input.js │ ├── test-sync-transform.js │ └── test-sync-transform.output.js ├── __tests__ │ ├── .eslintrc │ ├── Collection-test.js │ ├── Worker-test.js │ ├── __snapshots__ │ │ └── testUtils-test.js.snap │ ├── argsParser-test.js │ ├── core-test.js │ ├── matchNode-test.js │ ├── template-test.js │ ├── testUtils-test.js │ └── ts-decorator-auto-accessor-test.js ├── argsParser.js ├── collections │ ├── ImportDeclaration.js │ ├── JSXElement.js │ ├── Node.js │ ├── VariableDeclarator.js │ ├── __tests__ │ │ ├── .eslintrc │ │ ├── .jshintrc │ │ ├── ImportDeclaration-test.js │ │ ├── JSXElement-test.js │ │ ├── Node-test.js │ │ └── VariableDeclarator-test.js │ └── index.js ├── core.js ├── getParser.js ├── ignoreFiles.js ├── matchNode.js ├── template.js ├── testUtils.js └── utils │ ├── __tests__ │ ├── intersection-test.js │ ├── once-test.js │ └── union-test.js │ ├── intersection.js │ ├── once.js │ └── union.js ├── utils ├── requirePackage.js └── testUtils.js ├── website ├── .astro │ ├── settings.json │ └── types.d.ts ├── README.md ├── astro.config.mjs ├── package.json ├── public │ └── favicon.svg ├── src │ ├── assets │ │ └── houston.webp │ ├── content │ │ ├── config.ts │ │ └── docs │ │ │ ├── build │ │ │ ├── api-reference.mdx │ │ │ └── ast-grammar.mdx │ │ │ ├── index.mdx │ │ │ ├── overview │ │ │ └── introduction.mdx │ │ │ └── run │ │ │ └── cli.mdx │ └── env.d.ts ├── tsconfig.json └── yarn.lock └── yarn.lock /.changeset/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/.changeset/README.md -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/.changeset/config.json -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/.editorconfig -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | /dist/ 2 | /docs/ 3 | /sample/__testfixtures__/ 4 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/.eslintrc -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | bin/jscodeshift.js eol=lf 2 | -------------------------------------------------------------------------------- /.github/workflows/cr.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/.github/workflows/cr.yml -------------------------------------------------------------------------------- /.github/workflows/pull_request.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/.github/workflows/pull_request.yml -------------------------------------------------------------------------------- /.github/workflows/push.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/.github/workflows/push.yml -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/.github/workflows/test.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /dist 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /.node-version: -------------------------------------------------------------------------------- 1 | 16.20.2 2 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/.npmignore -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/CODE_OF_CONDUCT.md -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/README.md -------------------------------------------------------------------------------- /bin/__tests__/jscodeshift-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/bin/__tests__/jscodeshift-test.js -------------------------------------------------------------------------------- /bin/jscodeshift.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/bin/jscodeshift.js -------------------------------------------------------------------------------- /bin/jscodeshift.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/bin/jscodeshift.sh -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/index.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/package.json -------------------------------------------------------------------------------- /parser/__tests__/.eslintrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/parser/__tests__/.eslintrc -------------------------------------------------------------------------------- /parser/__tests__/__snapshots__/tsx-test.js.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/parser/__tests__/__snapshots__/tsx-test.js.snap -------------------------------------------------------------------------------- /parser/__tests__/tsx-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/parser/__tests__/tsx-test.js -------------------------------------------------------------------------------- /parser/babel5Compat.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/parser/babel5Compat.js -------------------------------------------------------------------------------- /parser/babylon.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/parser/babylon.js -------------------------------------------------------------------------------- /parser/flow.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/parser/flow.js -------------------------------------------------------------------------------- /parser/ts.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/parser/ts.js -------------------------------------------------------------------------------- /parser/tsOptions.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/parser/tsOptions.js -------------------------------------------------------------------------------- /parser/tsx.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/parser/tsx.js -------------------------------------------------------------------------------- /recipes/retain-first-comment.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/recipes/retain-first-comment.md -------------------------------------------------------------------------------- /sample/__testfixtures__/reverse-identifiers.input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/sample/__testfixtures__/reverse-identifiers.input.js -------------------------------------------------------------------------------- /sample/__testfixtures__/reverse-identifiers.output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/sample/__testfixtures__/reverse-identifiers.output.js -------------------------------------------------------------------------------- /sample/__testfixtures__/typescript/reverse-identifiers.input.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/sample/__testfixtures__/typescript/reverse-identifiers.input.ts -------------------------------------------------------------------------------- /sample/__testfixtures__/typescript/reverse-identifiers.output.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/sample/__testfixtures__/typescript/reverse-identifiers.output.ts -------------------------------------------------------------------------------- /sample/__tests__/__snapshots__/reverse-identifiers-test.js.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/sample/__tests__/__snapshots__/reverse-identifiers-test.js.snap -------------------------------------------------------------------------------- /sample/__tests__/reverse-identifiers-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/sample/__tests__/reverse-identifiers-test.js -------------------------------------------------------------------------------- /sample/reverse-identifiers.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/sample/reverse-identifiers.js -------------------------------------------------------------------------------- /src/Collection.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/Collection.js -------------------------------------------------------------------------------- /src/Runner.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/Runner.js -------------------------------------------------------------------------------- /src/Worker.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/Worker.js -------------------------------------------------------------------------------- /src/__testfixtures__/test-async-transform.input.js: -------------------------------------------------------------------------------- 1 | export const sum = (a, b) => a + b; 2 | -------------------------------------------------------------------------------- /src/__testfixtures__/test-async-transform.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/__testfixtures__/test-async-transform.js -------------------------------------------------------------------------------- /src/__testfixtures__/test-async-transform.output.js: -------------------------------------------------------------------------------- 1 | export const addition = (a, b) => a + b; 2 | -------------------------------------------------------------------------------- /src/__testfixtures__/test-sync-transform.input.js: -------------------------------------------------------------------------------- 1 | export const sum = (a, b) => a + b; 2 | -------------------------------------------------------------------------------- /src/__testfixtures__/test-sync-transform.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/__testfixtures__/test-sync-transform.js -------------------------------------------------------------------------------- /src/__testfixtures__/test-sync-transform.output.js: -------------------------------------------------------------------------------- 1 | export const addition = (a, b) => a + b; 2 | -------------------------------------------------------------------------------- /src/__tests__/.eslintrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/__tests__/.eslintrc -------------------------------------------------------------------------------- /src/__tests__/Collection-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/__tests__/Collection-test.js -------------------------------------------------------------------------------- /src/__tests__/Worker-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/__tests__/Worker-test.js -------------------------------------------------------------------------------- /src/__tests__/__snapshots__/testUtils-test.js.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/__tests__/__snapshots__/testUtils-test.js.snap -------------------------------------------------------------------------------- /src/__tests__/argsParser-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/__tests__/argsParser-test.js -------------------------------------------------------------------------------- /src/__tests__/core-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/__tests__/core-test.js -------------------------------------------------------------------------------- /src/__tests__/matchNode-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/__tests__/matchNode-test.js -------------------------------------------------------------------------------- /src/__tests__/template-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/__tests__/template-test.js -------------------------------------------------------------------------------- /src/__tests__/testUtils-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/__tests__/testUtils-test.js -------------------------------------------------------------------------------- /src/__tests__/ts-decorator-auto-accessor-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/__tests__/ts-decorator-auto-accessor-test.js -------------------------------------------------------------------------------- /src/argsParser.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/argsParser.js -------------------------------------------------------------------------------- /src/collections/ImportDeclaration.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/collections/ImportDeclaration.js -------------------------------------------------------------------------------- /src/collections/JSXElement.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/collections/JSXElement.js -------------------------------------------------------------------------------- /src/collections/Node.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/collections/Node.js -------------------------------------------------------------------------------- /src/collections/VariableDeclarator.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/collections/VariableDeclarator.js -------------------------------------------------------------------------------- /src/collections/__tests__/.eslintrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/collections/__tests__/.eslintrc -------------------------------------------------------------------------------- /src/collections/__tests__/.jshintrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/collections/__tests__/.jshintrc -------------------------------------------------------------------------------- /src/collections/__tests__/ImportDeclaration-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/collections/__tests__/ImportDeclaration-test.js -------------------------------------------------------------------------------- /src/collections/__tests__/JSXElement-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/collections/__tests__/JSXElement-test.js -------------------------------------------------------------------------------- /src/collections/__tests__/Node-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/collections/__tests__/Node-test.js -------------------------------------------------------------------------------- /src/collections/__tests__/VariableDeclarator-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/collections/__tests__/VariableDeclarator-test.js -------------------------------------------------------------------------------- /src/collections/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/collections/index.js -------------------------------------------------------------------------------- /src/core.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/core.js -------------------------------------------------------------------------------- /src/getParser.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/getParser.js -------------------------------------------------------------------------------- /src/ignoreFiles.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/ignoreFiles.js -------------------------------------------------------------------------------- /src/matchNode.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/matchNode.js -------------------------------------------------------------------------------- /src/template.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/template.js -------------------------------------------------------------------------------- /src/testUtils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/testUtils.js -------------------------------------------------------------------------------- /src/utils/__tests__/intersection-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/utils/__tests__/intersection-test.js -------------------------------------------------------------------------------- /src/utils/__tests__/once-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/utils/__tests__/once-test.js -------------------------------------------------------------------------------- /src/utils/__tests__/union-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/utils/__tests__/union-test.js -------------------------------------------------------------------------------- /src/utils/intersection.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/utils/intersection.js -------------------------------------------------------------------------------- /src/utils/once.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/utils/once.js -------------------------------------------------------------------------------- /src/utils/union.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/src/utils/union.js -------------------------------------------------------------------------------- /utils/requirePackage.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/utils/requirePackage.js -------------------------------------------------------------------------------- /utils/testUtils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/utils/testUtils.js -------------------------------------------------------------------------------- /website/.astro/settings.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/website/.astro/settings.json -------------------------------------------------------------------------------- /website/.astro/types.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/website/.astro/types.d.ts -------------------------------------------------------------------------------- /website/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/website/README.md -------------------------------------------------------------------------------- /website/astro.config.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/website/astro.config.mjs -------------------------------------------------------------------------------- /website/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/website/package.json -------------------------------------------------------------------------------- /website/public/favicon.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/website/public/favicon.svg -------------------------------------------------------------------------------- /website/src/assets/houston.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/website/src/assets/houston.webp -------------------------------------------------------------------------------- /website/src/content/config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/website/src/content/config.ts -------------------------------------------------------------------------------- /website/src/content/docs/build/api-reference.mdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/website/src/content/docs/build/api-reference.mdx -------------------------------------------------------------------------------- /website/src/content/docs/build/ast-grammar.mdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/website/src/content/docs/build/ast-grammar.mdx -------------------------------------------------------------------------------- /website/src/content/docs/index.mdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/website/src/content/docs/index.mdx -------------------------------------------------------------------------------- /website/src/content/docs/overview/introduction.mdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/website/src/content/docs/overview/introduction.mdx -------------------------------------------------------------------------------- /website/src/content/docs/run/cli.mdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/website/src/content/docs/run/cli.mdx -------------------------------------------------------------------------------- /website/src/env.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/website/src/env.d.ts -------------------------------------------------------------------------------- /website/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "astro/tsconfigs/strict" 3 | } 4 | -------------------------------------------------------------------------------- /website/yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/website/yarn.lock -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebook/jscodeshift/HEAD/yarn.lock --------------------------------------------------------------------------------