-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[unpacker] SyntaxError: Private name #Y is not defined #98
Comments
This is related to #32, it shouldn't rename the Y to |
Already fixed by handling private field. I also improved the error handling and logging, the file will be generated even though there is a parsing error. Will release a new version with the runner performance improvement PR. |
Awesome, thanks! :) |
Released 🚀 |
Thanks :) For future reference, this was released in: Which I believe is also included in: (It might be useful to include the version of unpacker/unminify used by the CLI in the CLI release notes to remove ambiguity) |
Confirming that it works with CLI Though still seeing the And there were a bunch of unminify errors that I will open a new issue for. Edit: Here is the issue for those errors: ⇒ npm run-script wakaru:unminify-chunk pages/_app
> chatgpt-source-watch@0.0.1 wakaru:unminify-chunk
> f() { CHUNK="$1"; npx @wakaru/cli all unpacked/_next/static/chunks/${CHUNK}.js --unpacker-output stage2-unpacked/${CHUNK} --unminify-output stage3-unminified/${CHUNK} --perf; }; f pages/_app
┌ Wakaru CLI v0.0.5
│
└ Selected features: Unpacker, Unminify
┌ Unpacker
│
◇ Unpacking unpacked/_next/static/chunks/pages/_app.js
│
◇ Finished
│
◆ Successfully generated 1224 modules (3m2s)
│
└ Output directory: ./stage2-unpacked/pages/_app
┌ Unminify
│
◇ Unminifying... (concurrency: 1)
│
◒ ..Multiple exports of "default" found, only the last one will be kept
◐
..snip: many unminify errors here (will open a new issue for them)..
◇ Finished
│
◆ Successfully unminified 1224 files (19m44s)
│
└ Output directory: ./stage3-unminified/pages/_app
┌─────────┬──────────────────────────┬────────┐
│ (index) │ key │ time │
├─────────┼──────────────────────────┼────────┤
│ 0 │ 'un-while-loop' │ 2070 │
│ 1 │ 'un-flip-comparisons' │ 2079 │
│ 2 │ 'un-numeric-literal' │ 2160 │
│ 3 │ 'un-return' │ 2167 │
│ 4 │ 'un-bracket-notation' │ 2181 │
│ 5 │ 'un-boolean' │ 2203 │
│ 6 │ 'un-template-literal' │ 2220 │
│ 7 │ 'un-use-strict' │ 2287 │
│ 8 │ 'un-undefined' │ 2634 │
│ 9 │ 'un-variable-merging' │ 2823 │
│ 10 │ 'un-assignment-merging' │ 2990 │
│ 11 │ 'module-mapping' │ 3587 │
│ 12 │ 'un-async-await' │ 4060 │
│ 13 │ 'un-iife' │ 4164 │
│ 14 │ 'un-typeof' │ 4247 │
│ 15 │ 'un-infinity' │ 4316 │
│ 16 │ 'un-esmodule-flag' │ 4557 │
│ 17 │ 'un-type-constructor' │ 6155 │
│ 18 │ 'un-conditionals' │ 6688 │
│ 19 │ 'un-enum' │ 6848 │
│ 20 │ 'un-es6-class' │ 8848 │
│ 21 │ 'un-export-rename' │ 10312 │
│ 22 │ 'un-parameters' │ 11368 │
│ 23 │ 'un-builtin-prototype' │ 12446 │
│ 24 │ 'prettier-1' │ 14311 │
│ 25 │ 'prettier' │ 15642 │
│ 26 │ 'un-jsx' │ 16243 │
│ 27 │ 'smart-inline' │ 16392 │
│ 28 │ 'un-curly-braces' │ 17804 │
│ 29 │ 'un-nullish-coalescing' │ 21042 │
│ 30 │ 'un-optional-chaining' │ 21216 │
│ 31 │ 'smart-rename' │ 26297 │
│ 32 │ 'jscodeshift-print' │ 30003 │
│ 33 │ 'un-runtime-helper' │ 70873 │
│ 34 │ 'un-sequence-expression' │ 76342 │
│ 35 │ 'un-parameters-lebab' │ 96794 │
│ 36 │ 'un-indirect-call' │ 130591 │
│ 37 │ 'lebab' │ 134495 │
│ 38 │ 'un-esm' │ 141852 │
│ 39 │ 'unpacker' │ 182051 │
│ 40 │ 'jscodeshift-parse' │ 235709 │
└─────────┴──────────────────────────┴────────┘
Error: ENOENT: no such file or directory, open 'out/perf.json'
at Object.openSync (node:fs:592:3)
at Object.writeFileSync (node:fs:2323:35)
at Object.writeFileSync (/Users/devalias/dev/0xdevalias/chatgpt-source-watch/node_modules/jsonfile/index.js:78:13)
at writePerfStats (/Users/devalias/dev/0xdevalias/chatgpt-source-watch/node_modules/@wakaru/cli/dist/cli.cjs:2421:21)
at nonInteractive (/Users/devalias/dev/0xdevalias/chatgpt-source-watch/node_modules/@wakaru/cli/dist/cli.cjs:2372:5)
at async Object.handler (/Users/devalias/dev/0xdevalias/chatgpt-source-watch/node_modules/@wakaru/cli/dist/cli.cjs:2014:5) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: 'out/perf.json'
} |
Describe the bug
Input code
From this commit:
unpacked/_next/static/chunks/pages/_app.js
Direct file link:
Reproduction
No response
Steps to reproduce
Expected behavior
Unpack/Unminify works properly.
Actual behavior
The error described above occurs.
The text was updated successfully, but these errors were encountered: