{"_id":"@mizchi/sucrase","_rev":"2958516","name":"@mizchi/sucrase","description":"Super-fast alternative to Babel for when you can target modern JS runtimes","dist-tags":{"latest":"4.1.0"},"maintainers":[{"name":"mizchi","email":"miz404@gmail.com"}],"time":{"modified":"2023-04-28T03:54:28.000Z","created":"2021-05-14T12:05:13.590Z","4.1.0":"2021-11-01T11:44:07.120Z","4.0.3":"2021-05-19T07:56:44.306Z","4.0.2":"2021-05-14T12:30:54.738Z","4.0.1":"2021-05-14T12:17:19.595Z","4.0.0":"2021-05-14T12:05:13.590Z"},"users":{},"author":{"name":"Alan Pierce","email":"alangpierce@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/alangpierce/sucrase.git"},"versions":{"4.1.0":{"name":"@mizchi/sucrase","version":"4.1.0","description":"Super-fast alternative to Babel for when you can target modern JS runtimes","author":{"name":"Alan Pierce","email":"alangpierce@gmail.com"},"license":"MIT","type":"module","main":"dist/index.cjs","module":"dist/index.mjs","scripts":{"build":"rollup -c","clean":"rm -rf ./build ./dist ./dist-self-build ./dist-types ./example-runner/example-repos ./test262/test262-checkout","generate":"ts-node generator/generate.ts","benchmark":"cd benchmark && yarn && sucrase-node ./benchmark.ts","benchmark-compare":"sucrase-node ./benchmark/compare-performance.ts","microbenchmark":"sucrase-node benchmark/microbenchmark.ts","lint":"eslint src --ext .ts","profile":"node --inspect-brk ./node_modules/.bin/sucrase-node ./benchmark/profile","profile-project":"node --inspect-brk ./node_modules/.bin/sucrase-node ./benchmark/benchmark-project.ts --profile","prepublishOnly":"yarn build","release":"sucrase-node script/release.ts","run-examples":"sucrase-node example-runner/example-runner.ts","test":"folio --config=test/folio.config.ts","test262":"node -r esbuild-register test262/run-test262.ts","test-with-coverage":"nyc mocha './test/**/*.ts'","report-coverage":"nyc report --reporter=text-lcov > coverage.lcov && codecov"},"repository":{"type":"git","url":"git+https://github.com/alangpierce/sucrase.git"},"keywords":["babel","jsx","typescript","flow"],"bugs":{"url":"https://github.com/alangpierce/sucrase/issues"},"devDependencies":{"@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-replace":"^2.4.2","@types/glob":"7.1.3","@types/mz":"^2.7.3","@types/node":"^15.0.3","@typescript-eslint/eslint-plugin":"^4.23.0","@typescript-eslint/parser":"^4.23.0","@wessberg/rollup-plugin-ts":"^1.3.14","esbuild":"^0.13.12","esbuild-register":"^3.0.0","eslint":"^7.26.0","eslint-config-airbnb-base":"^14.0.0","eslint-config-prettier":"^8.3.0","eslint-plugin-import":"^2.23.0","eslint-plugin-prettier":"^3.4.0","folio":"0.4.0-alpha6","mocha":"^9.1.3","prettier":"^2.3.0","rollup":"^2.47.0","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-terser":"^7.0.2","test262-harness":"^7.7.0","ts-interface-builder":"^0.3.0","ts-node":"^9.1.1","typescript":"^4.1.3"},"engines":{"node":">=14"},"dependencies":{"lines-and-columns":"^1.1.6"},"contributors":[{"name":"Direct contributors to the Sucrase project:"},{"name":"Alan Pierce"},{"name":"Sucrase contains a modified fork of Babylon, which itself was forked from Acorn."},{"name":"Babel and Babylon are copyright 2014-2018 Sebastian McKenzie"},{"name":"See https://babeljs.io/team for a list of contributors to the Babel project."},{"name":"List of Acorn contributors:"},{"name":"Adrian Rakovsky"},{"name":"Alistair Braidwood"},{"name":"Andres Suarez"},{"name":"Aparajita Fishman"},{"name":"Arian Stolwijk"},{"name":"Artem Govorov"},{"name":"Brandon Mills"},{"name":"Charles Hughes"},{"name":"Conrad Irwin"},{"name":"David Bonnet"},{"name":"Forbes Lindesay"},{"name":"Gilad Peleg"},{"name":"impinball"},{"name":"Ingvar Stepanyan"},{"name":"Jesse McCarthy"},{"name":"Jiaxing Wang"},{"name":"Joel Kemp"},{"name":"Johannes Herr"},{"name":"Jürg Lehni"},{"name":"keeyipchan"},{"name":"Kevin Kwok"},{"name":"krator"},{"name":"Marijn Haverbeke"},{"name":"Martin Carlberg"},{"name":"Mathias Bynens"},{"name":"Mathieu 'p01' Henri"},{"name":"Max Schaefer"},{"name":"Max Zerzouri"},{"name":"Mihai Bazon"},{"name":"Mike Rennie"},{"name":"Nick Fitzgerald"},{"name":"Oskar Schöldström"},{"name":"Paul Harper"},{"name":"Peter Rust"},{"name":"PlNG"},{"name":"r-e-d"},{"name":"Rich Harris"},{"name":"Sebastian McKenzie"},{"name":"zsjforcn"},{"name":"Kotaro Chikuba"}],"gitHead":"594be61326adef845af90fa9be9106b1955b99c1","homepage":"https://github.com/alangpierce/sucrase#readme","_id":"@mizchi/sucrase@4.1.0","_nodeVersion":"14.17.5","_npmVersion":"7.24.0","dist":{"shasum":"630042f2bc3494a88f2aa887fea3a0f01d65cbbd","size":120507,"noattachment":false,"key":"/@mizchi/sucrase/-/@mizchi/sucrase-4.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@mizchi/sucrase/download/@mizchi/sucrase-4.1.0.tgz"},"_npmUser":{"name":"mizchi","email":"miz404@gmail.com"},"directories":{},"maintainers":[{"name":"mizchi","email":"miz404@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sucrase_4.1.0_1635767046959_0.7189618058800848"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-27T14:45:53.738Z","publish_time":1635767047120,"_cnpm_publish_time":1635767047120},"4.0.3":{"name":"@mizchi/sucrase","version":"4.0.3","description":"Super-fast alternative to Babel for when you can target modern JS runtimes","author":{"name":"Alan Pierce","email":"alangpierce@gmail.com"},"license":"MIT","type":"module","main":"dist/index.cjs","module":"dist/index.mjs","bin":{"sucrase2":"dist/cli.js"},"scripts":{"build":"rollup -c","clean":"rm -rf ./build ./dist ./dist-self-build ./dist-types ./example-runner/example-repos ./test262/test262-checkout","generate":"ts-node generator/generate.ts","benchmark":"cd benchmark && yarn && sucrase-node ./benchmark.ts","benchmark-compare":"sucrase-node ./benchmark/compare-performance.ts","microbenchmark":"sucrase-node benchmark/microbenchmark.ts","lint":"eslint src --ext .ts","profile":"node --inspect-brk ./node_modules/.bin/sucrase-node ./benchmark/profile","profile-project":"node --inspect-brk ./node_modules/.bin/sucrase-node ./benchmark/benchmark-project.ts --profile","prepublishOnly":"yarn build","release":"sucrase-node script/release.ts","run-examples":"sucrase-node example-runner/example-runner.ts","test":"yarn lint && yarn test-only","test-only":"","test262":"sucrase-node test262/run-test262.ts","test-with-coverage":"nyc mocha './test/**/*.ts'","report-coverage":"nyc report --reporter=text-lcov > coverage.lcov && codecov"},"repository":{"type":"git","url":"git+https://github.com/alangpierce/sucrase.git"},"keywords":["babel","jsx","typescript","flow"],"bugs":{"url":"https://github.com/alangpierce/sucrase/issues"},"devDependencies":{"@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-replace":"^2.4.2","@types/glob":"7.1.3","@types/mz":"^2.7.3","@types/node":"^15.0.3","@typescript-eslint/eslint-plugin":"^4.23.0","@typescript-eslint/parser":"^4.23.0","@wessberg/rollup-plugin-ts":"^1.3.14","eslint":"^7.26.0","eslint-config-airbnb-base":"^14.0.0","eslint-config-prettier":"^8.3.0","eslint-plugin-import":"^2.23.0","eslint-plugin-prettier":"^3.4.0","folio":"0.4.0-alpha6","prettier":"^2.3.0","rollup":"^2.47.0","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-terser":"^7.0.2","test262-harness":"^7.7.0","ts-interface-builder":"^0.3.0","ts-node":"^9.1.1","typescript":"^4.1.3"},"engines":{"node":">=14"},"dependencies":{"lines-and-columns":"^1.1.6"},"contributors":[{"name":"Direct contributors to the Sucrase project:"},{"name":"Alan Pierce"},{"name":"Sucrase contains a modified fork of Babylon, which itself was forked from Acorn."},{"name":"Babel and Babylon are copyright 2014-2018 Sebastian McKenzie"},{"name":"See https://babeljs.io/team for a list of contributors to the Babel project."},{"name":"List of Acorn contributors:"},{"name":"Adrian Rakovsky"},{"name":"Alistair Braidwood"},{"name":"Andres Suarez"},{"name":"Aparajita Fishman"},{"name":"Arian Stolwijk"},{"name":"Artem Govorov"},{"name":"Brandon Mills"},{"name":"Charles Hughes"},{"name":"Conrad Irwin"},{"name":"David Bonnet"},{"name":"Forbes Lindesay"},{"name":"Gilad Peleg"},{"name":"impinball"},{"name":"Ingvar Stepanyan"},{"name":"Jesse McCarthy"},{"name":"Jiaxing Wang"},{"name":"Joel Kemp"},{"name":"Johannes Herr"},{"name":"Jürg Lehni"},{"name":"keeyipchan"},{"name":"Kevin Kwok"},{"name":"krator"},{"name":"Marijn Haverbeke"},{"name":"Martin Carlberg"},{"name":"Mathias Bynens"},{"name":"Mathieu 'p01' Henri"},{"name":"Max Schaefer"},{"name":"Max Zerzouri"},{"name":"Mihai Bazon"},{"name":"Mike Rennie"},{"name":"Nick Fitzgerald"},{"name":"Oskar Schöldström"},{"name":"Paul Harper"},{"name":"Peter Rust"},{"name":"PlNG"},{"name":"r-e-d"},{"name":"Rich Harris"},{"name":"Sebastian McKenzie"},{"name":"zsjforcn"},{"name":"Kotaro Chikuba"}],"gitHead":"e6c00b698f55e2e7e09996a4efe07fcb363498b0","homepage":"https://github.com/alangpierce/sucrase#readme","_id":"@mizchi/sucrase@4.0.3","_nodeVersion":"16.1.0","_npmVersion":"6.14.13","dist":{"shasum":"bf663bcf84dd92a1b7d5cd75e904bc2af2651084","size":126360,"noattachment":false,"key":"/@mizchi/sucrase/-/@mizchi/sucrase-4.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/@mizchi/sucrase/download/@mizchi/sucrase-4.0.3.tgz"},"_npmUser":{"name":"mizchi","email":"miz404@gmail.com"},"directories":{},"maintainers":[{"name":"mizchi","email":"miz404@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sucrase_4.0.3_1621411004127_0.49983580168626585"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-27T14:45:52.694Z","publish_time":1621411004306,"_cnpm_publish_time":1621411004306},"4.0.2":{"name":"@mizchi/sucrase","version":"4.0.2","description":"Super-fast alternative to Babel for when you can target modern JS runtimes","author":{"name":"Alan Pierce","email":"alangpierce@gmail.com"},"license":"MIT","type":"module","module":"dist/index.js","types":"dist/index.d.ts","bin":{"sucrase2":"dist/cli.js"},"scripts":{"build":"rollup -c","clean":"rm -rf ./build ./dist ./dist-self-build ./dist-types ./example-runner/example-repos ./test262/test262-checkout","generate":"ts-node generator/generate.ts","benchmark":"cd benchmark && yarn && sucrase-node ./benchmark.ts","benchmark-compare":"sucrase-node ./benchmark/compare-performance.ts","microbenchmark":"sucrase-node benchmark/microbenchmark.ts","lint":"eslint src --ext .ts","profile":"node --inspect-brk ./node_modules/.bin/sucrase-node ./benchmark/profile","profile-project":"node --inspect-brk ./node_modules/.bin/sucrase-node ./benchmark/benchmark-project.ts --profile","prepublishOnly":"yarn build","release":"sucrase-node script/release.ts","run-examples":"sucrase-node example-runner/example-runner.ts","test":"yarn lint && yarn test-only","test-only":"","test262":"sucrase-node test262/run-test262.ts","test-with-coverage":"nyc mocha './test/**/*.ts'","report-coverage":"nyc report --reporter=text-lcov > coverage.lcov && codecov"},"repository":{"type":"git","url":"git+https://github.com/alangpierce/sucrase.git"},"keywords":["babel","jsx","typescript","flow"],"bugs":{"url":"https://github.com/alangpierce/sucrase/issues"},"devDependencies":{"@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-replace":"^2.4.2","@types/glob":"7.1.3","@types/mz":"^2.7.3","@types/node":"^15.0.3","@typescript-eslint/eslint-plugin":"^4.23.0","@typescript-eslint/parser":"^4.23.0","@wessberg/rollup-plugin-ts":"^1.3.14","eslint":"^7.26.0","eslint-config-airbnb-base":"^14.0.0","eslint-config-prettier":"^8.3.0","eslint-plugin-import":"^2.23.0","eslint-plugin-prettier":"^3.4.0","folio":"0.4.0-alpha6","prettier":"^2.3.0","rollup":"^2.47.0","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-terser":"^7.0.2","test262-harness":"^7.7.0","ts-interface-builder":"^0.3.0","ts-node":"^9.1.1","typescript":"^4.1.3"},"engines":{"node":">=14"},"dependencies":{"lines-and-columns":"^1.1.6"},"contributors":[{"name":"Direct contributors to the Sucrase project:"},{"name":"Alan Pierce"},{"name":"Sucrase contains a modified fork of Babylon, which itself was forked from Acorn."},{"name":"Babel and Babylon are copyright 2014-2018 Sebastian McKenzie"},{"name":"See https://babeljs.io/team for a list of contributors to the Babel project."},{"name":"List of Acorn contributors:"},{"name":"Adrian Rakovsky"},{"name":"Alistair Braidwood"},{"name":"Andres Suarez"},{"name":"Aparajita Fishman"},{"name":"Arian Stolwijk"},{"name":"Artem Govorov"},{"name":"Brandon Mills"},{"name":"Charles Hughes"},{"name":"Conrad Irwin"},{"name":"David Bonnet"},{"name":"Forbes Lindesay"},{"name":"Gilad Peleg"},{"name":"impinball"},{"name":"Ingvar Stepanyan"},{"name":"Jesse McCarthy"},{"name":"Jiaxing Wang"},{"name":"Joel Kemp"},{"name":"Johannes Herr"},{"name":"Jürg Lehni"},{"name":"keeyipchan"},{"name":"Kevin Kwok"},{"name":"krator"},{"name":"Marijn Haverbeke"},{"name":"Martin Carlberg"},{"name":"Mathias Bynens"},{"name":"Mathieu 'p01' Henri"},{"name":"Max Schaefer"},{"name":"Max Zerzouri"},{"name":"Mihai Bazon"},{"name":"Mike Rennie"},{"name":"Nick Fitzgerald"},{"name":"Oskar Schöldström"},{"name":"Paul Harper"},{"name":"Peter Rust"},{"name":"PlNG"},{"name":"r-e-d"},{"name":"Rich Harris"},{"name":"Sebastian McKenzie"},{"name":"zsjforcn"},{"name":"Kotaro Chikuba"}],"gitHead":"58634e9c52c56060738df79358736ccecd9b3471","homepage":"https://github.com/alangpierce/sucrase#readme","_id":"@mizchi/sucrase@4.0.2","_nodeVersion":"16.1.0","_npmVersion":"6.14.13","dist":{"shasum":"b017f2e9e7b74d4ec0447a1402cc9a821cc6da5c","size":97511,"noattachment":false,"key":"/@mizchi/sucrase/-/@mizchi/sucrase-4.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@mizchi/sucrase/download/@mizchi/sucrase-4.0.2.tgz"},"_npmUser":{"name":"mizchi","email":"miz404@gmail.com"},"directories":{},"maintainers":[{"name":"mizchi","email":"miz404@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sucrase_4.0.2_1620995454582_0.581514881716942"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-27T14:45:51.193Z","publish_time":1620995454738,"_cnpm_publish_time":1620995454738},"4.0.1":{"name":"@mizchi/sucrase","version":"4.0.1","description":"Super-fast alternative to Babel for when you can target modern JS runtimes","author":{"name":"Alan Pierce","email":"alangpierce@gmail.com"},"license":"MIT","type":"module","main":"dist/index.js","module":"dist/index.js","types":"dist/index.d.ts","bin":{"sucrase2":"dist/cli.js"},"scripts":{"build":"rollup -c","clean":"rm -rf ./build ./dist ./dist-self-build ./dist-types ./example-runner/example-repos ./test262/test262-checkout","generate":"ts-node generator/generate.ts","benchmark":"cd benchmark && yarn && sucrase-node ./benchmark.ts","benchmark-compare":"sucrase-node ./benchmark/compare-performance.ts","microbenchmark":"sucrase-node benchmark/microbenchmark.ts","lint":"eslint src --ext .ts","profile":"node --inspect-brk ./node_modules/.bin/sucrase-node ./benchmark/profile","profile-project":"node --inspect-brk ./node_modules/.bin/sucrase-node ./benchmark/benchmark-project.ts --profile","prepublishOnly":"yarn build","release":"sucrase-node script/release.ts","run-examples":"sucrase-node example-runner/example-runner.ts","test":"yarn lint && yarn test-only","test-only":"","test262":"sucrase-node test262/run-test262.ts","test-with-coverage":"nyc mocha './test/**/*.ts'","report-coverage":"nyc report --reporter=text-lcov > coverage.lcov && codecov"},"repository":{"type":"git","url":"git+https://github.com/alangpierce/sucrase.git"},"keywords":["babel","jsx","typescript","flow"],"bugs":{"url":"https://github.com/alangpierce/sucrase/issues"},"devDependencies":{"@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-replace":"^2.4.2","@types/glob":"7.1.3","@types/mz":"^2.7.3","@types/node":"^15.0.3","@typescript-eslint/eslint-plugin":"^4.23.0","@typescript-eslint/parser":"^4.23.0","@wessberg/rollup-plugin-ts":"^1.3.14","eslint":"^7.26.0","eslint-config-airbnb-base":"^14.0.0","eslint-config-prettier":"^8.3.0","eslint-plugin-import":"^2.23.0","eslint-plugin-prettier":"^3.4.0","folio":"0.4.0-alpha6","prettier":"^2.3.0","rollup":"^2.47.0","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-terser":"^7.0.2","test262-harness":"^7.7.0","ts-interface-builder":"^0.3.0","ts-node":"^9.1.1","typescript":"^4.1.3"},"engines":{"node":">=14"},"dependencies":{"lines-and-columns":"^1.1.6"},"contributors":[{"name":"Direct contributors to the Sucrase project:"},{"name":"Alan Pierce"},{"name":"Sucrase contains a modified fork of Babylon, which itself was forked from Acorn."},{"name":"Babel and Babylon are copyright 2014-2018 Sebastian McKenzie"},{"name":"See https://babeljs.io/team for a list of contributors to the Babel project."},{"name":"List of Acorn contributors:"},{"name":"Adrian Rakovsky"},{"name":"Alistair Braidwood"},{"name":"Andres Suarez"},{"name":"Aparajita Fishman"},{"name":"Arian Stolwijk"},{"name":"Artem Govorov"},{"name":"Brandon Mills"},{"name":"Charles Hughes"},{"name":"Conrad Irwin"},{"name":"David Bonnet"},{"name":"Forbes Lindesay"},{"name":"Gilad Peleg"},{"name":"impinball"},{"name":"Ingvar Stepanyan"},{"name":"Jesse McCarthy"},{"name":"Jiaxing Wang"},{"name":"Joel Kemp"},{"name":"Johannes Herr"},{"name":"Jürg Lehni"},{"name":"keeyipchan"},{"name":"Kevin Kwok"},{"name":"krator"},{"name":"Marijn Haverbeke"},{"name":"Martin Carlberg"},{"name":"Mathias Bynens"},{"name":"Mathieu 'p01' Henri"},{"name":"Max Schaefer"},{"name":"Max Zerzouri"},{"name":"Mihai Bazon"},{"name":"Mike Rennie"},{"name":"Nick Fitzgerald"},{"name":"Oskar Schöldström"},{"name":"Paul Harper"},{"name":"Peter Rust"},{"name":"PlNG"},{"name":"r-e-d"},{"name":"Rich Harris"},{"name":"Sebastian McKenzie"},{"name":"zsjforcn"},{"name":"Kotaro Chikuba"}],"gitHead":"418ff635af67a70c3c8362405981411ce78b87bf","homepage":"https://github.com/alangpierce/sucrase#readme","_id":"@mizchi/sucrase@4.0.1","_nodeVersion":"16.1.0","_npmVersion":"6.14.13","dist":{"shasum":"ed1d17c4704e14d30730832dfb597a0bf957a757","size":97423,"noattachment":false,"key":"/@mizchi/sucrase/-/@mizchi/sucrase-4.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@mizchi/sucrase/download/@mizchi/sucrase-4.0.1.tgz"},"_npmUser":{"name":"mizchi","email":"miz404@gmail.com"},"directories":{},"maintainers":[{"name":"mizchi","email":"miz404@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sucrase_4.0.1_1620994639455_0.8966447696849404"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-27T14:45:48.988Z","publish_time":1620994639595,"_cnpm_publish_time":1620994639595},"4.0.0":{"name":"@mizchi/sucrase","version":"4.0.0","description":"Super-fast alternative to Babel for when you can target modern JS runtimes","author":{"name":"Alan Pierce","email":"alangpierce@gmail.com"},"license":"MIT","type":"module","main":"dist/index","module":"dist/index.js","types":"dist/index.d.ts","bin":{"sucrase2":"dist/cli.js"},"scripts":{"build":"rollup -c","clean":"rm -rf ./build ./dist ./dist-self-build ./dist-types ./example-runner/example-repos ./test262/test262-checkout","generate":"ts-node generator/generate.ts","benchmark":"cd benchmark && yarn && sucrase-node ./benchmark.ts","benchmark-compare":"sucrase-node ./benchmark/compare-performance.ts","microbenchmark":"sucrase-node benchmark/microbenchmark.ts","lint":"eslint src --ext .ts","profile":"node --inspect-brk ./node_modules/.bin/sucrase-node ./benchmark/profile","profile-project":"node --inspect-brk ./node_modules/.bin/sucrase-node ./benchmark/benchmark-project.ts --profile","prepublishOnly":"yarn build","release":"sucrase-node script/release.ts","run-examples":"sucrase-node example-runner/example-runner.ts","test":"yarn lint && yarn test-only","test-only":"","test262":"sucrase-node test262/run-test262.ts","test-with-coverage":"nyc mocha './test/**/*.ts'","report-coverage":"nyc report --reporter=text-lcov > coverage.lcov && codecov"},"repository":{"type":"git","url":"git+https://github.com/alangpierce/sucrase.git"},"keywords":["babel","jsx","typescript","flow"],"bugs":{"url":"https://github.com/alangpierce/sucrase/issues"},"devDependencies":{"@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-replace":"^2.4.2","@types/glob":"7.1.3","@types/mz":"^2.7.3","@types/node":"^15.0.3","@typescript-eslint/eslint-plugin":"^4.23.0","@typescript-eslint/parser":"^4.23.0","@wessberg/rollup-plugin-ts":"^1.3.14","eslint":"^7.26.0","eslint-config-airbnb-base":"^14.0.0","eslint-config-prettier":"^8.3.0","eslint-plugin-import":"^2.23.0","eslint-plugin-prettier":"^3.4.0","folio":"0.4.0-alpha6","prettier":"^2.3.0","rollup":"^2.47.0","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-terser":"^7.0.2","test262-harness":"^7.7.0","ts-interface-builder":"^0.3.0","ts-node":"^9.1.1","typescript":"^4.1.3"},"engines":{"node":">=14"},"dependencies":{"lines-and-columns":"^1.1.6"},"contributors":[{"name":"Direct contributors to the Sucrase project:"},{"name":"Alan Pierce"},{"name":"Sucrase contains a modified fork of Babylon, which itself was forked from Acorn."},{"name":"Babel and Babylon are copyright 2014-2018 Sebastian McKenzie"},{"name":"See https://babeljs.io/team for a list of contributors to the Babel project."},{"name":"List of Acorn contributors:"},{"name":"Adrian Rakovsky"},{"name":"Alistair Braidwood"},{"name":"Andres Suarez"},{"name":"Aparajita Fishman"},{"name":"Arian Stolwijk"},{"name":"Artem Govorov"},{"name":"Brandon Mills"},{"name":"Charles Hughes"},{"name":"Conrad Irwin"},{"name":"David Bonnet"},{"name":"Forbes Lindesay"},{"name":"Gilad Peleg"},{"name":"impinball"},{"name":"Ingvar Stepanyan"},{"name":"Jesse McCarthy"},{"name":"Jiaxing Wang"},{"name":"Joel Kemp"},{"name":"Johannes Herr"},{"name":"Jürg Lehni"},{"name":"keeyipchan"},{"name":"Kevin Kwok"},{"name":"krator"},{"name":"Marijn Haverbeke"},{"name":"Martin Carlberg"},{"name":"Mathias Bynens"},{"name":"Mathieu 'p01' Henri"},{"name":"Max Schaefer"},{"name":"Max Zerzouri"},{"name":"Mihai Bazon"},{"name":"Mike Rennie"},{"name":"Nick Fitzgerald"},{"name":"Oskar Schöldström"},{"name":"Paul Harper"},{"name":"Peter Rust"},{"name":"PlNG"},{"name":"r-e-d"},{"name":"Rich Harris"},{"name":"Sebastian McKenzie"},{"name":"zsjforcn"},{"name":"Kotaro Chikuba"}],"gitHead":"15c7282221aabfb457fc8bd3b73e349e934412f6","homepage":"https://github.com/alangpierce/sucrase#readme","_id":"@mizchi/sucrase@4.0.0","_nodeVersion":"16.1.0","_npmVersion":"6.14.13","dist":{"shasum":"df9305b559412765a4c23df6a700cfdd04861db0","size":97409,"noattachment":false,"key":"/@mizchi/sucrase/-/@mizchi/sucrase-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@mizchi/sucrase/download/@mizchi/sucrase-4.0.0.tgz"},"_npmUser":{"name":"mizchi","email":"miz404@gmail.com"},"directories":{},"maintainers":[{"name":"mizchi","email":"miz404@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sucrase_4.0.0_1620993913349_0.3106551950697405"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-27T14:45:46.667Z","publish_time":1620993913590,"_cnpm_publish_time":1620993913590}},"readme":"# @mizchi/sucrase\n\nThis project is fork of sucrase compiler\n\n## Goals\n\n- TypeScript first (default)\n- Fast\n- Lightweight build size (110kb)\n- For Modern Browsers\n## Examples\n\n```ts\nimport {transform} from \"@mizchi/sucrase\";\n// typescript is default\nconst code = transform(\"export const x: number = 1;\", {\n  transforms: [\"jsx\"],\n  keepUnusedImports: true,\n});\nconsole.log(code.code);\n```\n\n## Diferrences from sucrase\n\n- Drop integrations\n- Drop flow\n- Drop commonjs transform\n- Use node `--experimental-loader` instead of hook\n\n----\n# Sucrase\n\n[![Build Status](https://github.com/alangpierce/sucrase/workflows/All%20tests/badge.svg)](https://github.com/alangpierce/sucrase/actions)\n[![npm version](https://img.shields.io/npm/v/sucrase.svg)](https://www.npmjs.com/package/sucrase)\n[![Install Size](https://packagephobia.now.sh/badge?p=sucrase)](https://packagephobia.now.sh/result?p=sucrase)\n[![MIT License](https://img.shields.io/npm/l/express.svg?maxAge=2592000)](LICENSE)\n[![Join the chat at https://gitter.im/sucrasejs](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/sucrasejs/Lobby)\n\n### [Try it out](https://sucrase.io)\n\nSucrase is an alternative to Babel that allows super-fast development builds.\nInstead of compiling a large range of JS features to be able to work in Internet\nExplorer, Sucrase assumes that you're developing with a recent browser or recent\nNode.js version, so it focuses on compiling non-standard language extensions:\nJSX, TypeScript, and Flow. Because of this smaller scope, Sucrase can get away\nwith an architecture that is much more performant but less extensible and\nmaintainable. Sucrase's parser is forked from Babel's parser (so Sucrase is\nindebted to Babel and wouldn't be possible without it) and trims it down to a\nfocused subset of what Babel solves. If it fits your use case, hopefully Sucrase\ncan speed up your development experience!\n\n**Sucrase has been extensively tested.** It can successfully build\nthe [Benchling](https://benchling.com/) frontend code,\n[Babel](https://github.com/babel/babel),\n[React](https://github.com/facebook/react),\n[TSLint](https://github.com/palantir/tslint),\n[Apollo client](https://github.com/apollographql/apollo-client), and\n[decaffeinate](https://github.com/decaffeinate/decaffeinate)\nwith all tests passing, about 1 million lines of code total.\n\n**Sucrase is about 20x faster than Babel.** Here's one measurement of how\nSucrase compares with other tools when compiling the Jest codebase 3 times,\nabout 360k lines of code total:\n```\n            Time            Speed\nSucrase     1.64 seconds    220221 lines per second\nswc         2.13 seconds    169502 lines per second\nesbuild     3.02 seconds    119738 lines per second\nTypeScript  24.18 seconds   14937 lines per second\nBabel       27.22 seconds   13270 lines per second\n```\nDetails: Measured on January 2021. Tools run in single-threaded mode without warm-up. See the\n[benchmark code](https://github.com/alangpierce/sucrase/blob/main/benchmark/benchmark.ts)\nfor methodology and caveats.\n\n## Transforms\n\nThe main configuration option in Sucrase is an array of transform names. These\ntransforms are available:\n* **jsx**: Transforms JSX syntax to `React.createElement`, e.g. `<div a={b} />`\n  becomes `React.createElement('div', {a: b})`. Behaves like Babel 7's\n  [React preset](https://github.com/babel/babel/tree/main/packages/babel-preset-react),\n  including adding `createReactClass` display names and JSX context information.\n* **typescript**: Compiles TypeScript code to JavaScript, removing type\n  annotations and handling features like enums. Does not check types. Sucrase\n  transforms each file independently, so you should enable the `isolatedModules`\n  TypeScript flag so that the typechecker will disallow the few features like\n  `const enum`s that need cross-file compilation.\n* **flow**:  Removes Flow type annotations. Does not check types.\n* **imports**: Transforms ES Modules (`import`/`export`) to CommonJS\n  (`require`/`module.exports`) using the same approach as Babel and TypeScript\n  with `--esModuleInterop`. Also includes dynamic `import`.\n* **react-hot-loader**: Performs the equivalent of the `react-hot-loader/babel`\n  transform in the [react-hot-loader](https://github.com/gaearon/react-hot-loader)\n  project. This enables advanced hot reloading use cases such as editing of\n  bound methods.\n* **jest**: Hoist desired [jest](https://jestjs.io/) method calls above imports in\n  the same way as [babel-plugin-jest-hoist](https://github.com/facebook/jest/tree/master/packages/babel-plugin-jest-hoist).\n  Does not validate the arguments passed to `jest.mock`, but the same rules still apply.\n\nThese proposed JS features are built-in and always transformed:\n* [Optional chaining](https://github.com/tc39/proposal-optional-chaining): `a?.b`\n* [Nullish coalescing](https://github.com/tc39/proposal-nullish-coalescing): `a ?? b`\n* [Class fields](https://github.com/tc39/proposal-class-fields): `class C { x = 1; }`.\n  This includes static fields but not the `#x` private field syntax.\n* [Export namespace syntax](https://github.com/tc39/proposal-export-ns-from):\n  `export * as a from 'a';`\n* [Numeric separators](https://github.com/tc39/proposal-numeric-separator):\n  `const n = 1_234;`\n* [Optional catch binding](https://github.com/tc39/proposal-optional-catch-binding):\n  `try { doThing(); } catch { }`.\n\n### Unsupported syntax\n\nAll JS syntax not mentioned above will \"pass through\" and needs to be supported\nby your JS runtime. For example:\n* Decorators, private fields, `throw` expressions, generator arrow functions,\n  and `do` expressions are all unsupported in browsers and Node (as of this\n  writing), and Sucrase doesn't make an attempt to transpile them.\n* Object rest/spread, async functions, and async iterators are all recent\n  features that should work fine, but might cause issues if you use older\n  versions of tools like webpack. BigInt and newer regex features may or may not\n  work, based on your tooling.\n\n### JSX Options\nLike Babel, Sucrase compiles JSX to React functions by default, but can be\nconfigured for any JSX use case.\n* **jsxPragma**: Element creation function, defaults to `React.createElement`.\n* **jsxFragmentPragma**: Fragment component, defaults to `React.Fragment`.\n\n### Legacy CommonJS interop\nTwo legacy modes can be used with the `import` transform:\n* **enableLegacyTypeScriptModuleInterop**: Use the default TypeScript approach\n  to CommonJS interop instead of assuming that TypeScript's `--esModuleInterop`\n  flag is enabled. For example, if a CJS module exports a function, legacy\n  TypeScript interop requires you to write `import * as add from './add';`,\n  while Babel, Webpack, Node.js, and TypeScript with `--esModuleInterop` require\n  you to write `import add from './add';`. As mentioned in the\n  [docs](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-7.html#support-for-import-d-from-cjs-form-commonjs-modules-with---esmoduleinterop),\n  the TypeScript team recommends you always use `--esModuleInterop`.\n* **enableLegacyBabel5ModuleInterop**: Use the Babel 5 approach to CommonJS\n  interop, so that you can run `require('./MyModule')` instead of\n  `require('./MyModule').default`. Analogous to\n  [babel-plugin-add-module-exports](https://github.com/59naga/babel-plugin-add-module-exports).\n\n## Usage\n\nInstallation:\n\n```\nyarn add --dev sucrase  # Or npm install --save-dev sucrase\n```\n\nOften, you'll want to use one of the build tool integrations:\n[Webpack](https://github.com/alangpierce/sucrase/tree/main/integrations/webpack-loader),\n[Gulp](https://github.com/alangpierce/sucrase/tree/main/integrations/gulp-plugin),\n[Jest](https://github.com/alangpierce/sucrase/tree/main/integrations/jest-plugin),\n[Rollup](https://github.com/rollup/plugins/tree/master/packages/sucrase),\n[Broccoli](https://github.com/stefanpenner/broccoli-sucrase).\n\nCompile on-the-fly via a require hook with some [reasonable defaults](src/register.ts):\n\n```js\n// Register just one extension.\nrequire(\"sucrase/register/ts\");\n// Or register all at once.\nrequire(\"sucrase/register\");\n```\n\nCompile on-the-fly via a drop-in replacement for node:\n\n```\nsucrase-node index.ts\n```\n\nRun on a directory:\n\n```\nsucrase ./srcDir -d ./outDir --transforms typescript,imports\n```\n\nCall from JS directly:\n\n```js\nimport {transform} from \"sucrase\";\nconst compiledCode = transform(code, {transforms: [\"typescript\", \"imports\"]}).code;\n```\n\n## What Sucrase is not\n\nSucrase is intended to be useful for the most common cases, but it does not aim\nto have nearly the scope and versatility of Babel. Some specific examples:\n\n* Sucrase does not check your code for errors. Sucrase's contract is that if you\n  give it valid code, it will produce valid JS code. If you give it invalid\n  code, it might produce invalid code, it might produce valid code, or it might\n  give an error. Always use Sucrase with a linter or typechecker, which is more\n  suited for error-checking.\n* Sucrase is not pluginizable. With the current architecture, transforms need to\n  be explicitly written to cooperate with each other, so each additional\n  transform takes significant extra work.\n* Sucrase is not good for prototyping language extensions and upcoming language\n  features. Its faster architecture makes new transforms more difficult to write\n  and more fragile.\n* Sucrase will never produce code for old browsers like IE. Compiling code down\n  to ES5 is much more complicated than any transformation that Sucrase needs to\n  do.\n* Sucrase is hesitant to implement upcoming JS features, although some of them\n  make sense to implement for pragmatic reasons. Its main focus is on language\n  extensions (JSX, TypeScript, Flow) that will never be supported by JS\n  runtimes.\n* Like Babel, Sucrase is not a typechecker, and must process each file in\n  isolation. For example, TypeScript `const enum`s are treated as regular\n  `enum`s rather than inlining across files.\n* You should think carefully before using Sucrase in production. Sucrase is\n  mostly beneficial in development, and in many cases, Babel or tsc will be more\n  suitable for production builds.\n\nSee the [Project Vision](./docs/PROJECT_VISION.md) document for more details on\nthe philosophy behind Sucrase.\n\n## Motivation\n\nAs JavaScript implementations mature, it becomes more and more reasonable to\ndisable Babel transforms, especially in development when you know that you're\ntargeting a modern runtime. You might hope that you could simplify and speed up\nthe build step by eventually disabling Babel entirely, but this isn't possible\nif you're using a non-standard language extension like JSX, TypeScript, or Flow.\nUnfortunately, disabling most transforms in Babel doesn't speed it up as much as\nyou might expect. To understand, let's take a look at how Babel works:\n\n1. Tokenize the input source code into a token stream.\n2. Parse the token stream into an AST.\n3. Walk the AST to compute the scope information for each variable.\n4. Apply all transform plugins in a single traversal, resulting in a new AST.\n5. Print the resulting AST.\n\nOnly step 4 gets faster when disabling plugins, so there's always a fixed cost\nto running Babel regardless of how many transforms are enabled.\n\nSucrase bypasses most of these steps, and works like this:\n1. Tokenize the input source code into a token stream using a trimmed-down fork\n   of the Babel parser. This fork does not produce a full AST, but still\n   produces meaningful token metadata specifically designed for the later\n   transforms.\n2. Scan through the tokens, computing preliminary information like all\n   imported/exported names.\n3. Run the transform by doing a pass through the tokens and performing a number\n   of careful find-and-replace operations, like replacing `<Foo` with\n   `React.createElement(Foo`.\n\nBecause Sucrase works on a lower level and uses a custom parser for its use\ncase, it is much faster than Babel.\n\n## Contributing\n\nContributions are welcome, whether they be bug reports, PRs, docs, tests, or\nanything else! Please take a look through the [Contributing Guide](./CONTRIBUTING.md)\nto learn how to get started.\n\n## License and attribution\n\nSucrase is MIT-licensed. A large part of Sucrase is based on a fork of the\n[Babel parser](https://github.com/babel/babel/tree/main/packages/babel-parser),\nwhich is also MIT-licensed.\n\n## Why the name?\n\nSucrase is an enzyme that processes sugar. Get it?\n","_attachments":{},"homepage":"https://github.com/alangpierce/sucrase#readme","bugs":{"url":"https://github.com/alangpierce/sucrase/issues"},"license":"MIT"}