Skip to content
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

ember-cli-update 0.43.3 ember-qunit-codemod failing on tests/index.html #200

Open
lfrost opened this issue Sep 28, 2019 · 1 comment
Open
Labels

Comments

@lfrost
Copy link

lfrost commented Sep 28, 2019

I am trying to use ember-cli-update 0.43.3 to update an Ember 3.12.0 application to 3.13.0. I am first trying to run all codemods against 3.12.0. When running ember-qunit-codemod, I get the following error on tests/index.html.

$ ember -v
ember-cli: 3.12.0
node: 10.16.3
os: linux x64
$ ember-cli-update --version
0.43.3
$ ember-cli-update --run-codemods
? These codemods apply to your project. Select which ones to run. ember-modules-codemod, ember-qunit-codemod, ember-test-helpers-c
odemod, es5-getter-ember-codemod, qunit-dom-codemod
...
Running codemod ember-qunit-codemod
Running command 1 of 1
npx: installed 360 in 21.594s
Processing 50 files...
Spawning 7 workers...
Sending 8 files to free worker...
Sending 8 files to free worker...
Sending 8 files to free worker...
Sending 8 files to free worker...
Sending 8 files to free worker...
Sending 8 files to free worker...
Sending 2 files to free worker...
 ERR tests/index.html Transformation error (Unexpected token (1:1))
SyntaxError: Unexpected token (1:1)
    at Object.raise (~/.npm/_npx/6657/lib/node_modules/ember-qunit-codemod/node_modules/@babel/parser/lib/index.js:6400:17)
    at Object.unexpected (~/.npm/_npx/6657/lib/node_modules/ember-qunit-codemod/node_modules/@babel/parser/lib/index.js:7728:16)
    at Object.tsParseNonArrayType (~/.npm/_npx/6657/lib/node_modules/ember-qunit-codemod/node_modules/@babel/parser/lib/index.js:4502:16)
    at Object.tsParseArrayTypeOrHigher (~/.npm/_npx/6657/lib/node_modules/ember-qunit-codemod/node_modules/@babel/parser/lib/index.js:4506:21)
    at Object.tsParseTypeOperatorOrHigher (~/.npm/_npx/6657/lib/node_modules/ember-qunit-codemod/node_modules/@babel/parser/lib/index.js:4561:120)
    at Object.tsParseUnionOrIntersectionType (~/.npm/_npx/6657/lib/node_modules/ember-qunit-codemod/node_modules/@babel/parser/lib/index.js:4566:16)
    at Object.tsParseIntersectionTypeOrHigher (~/.npm/_npx/6657/lib/node_modules/ember-qunit-codemod/node_modules/@babel/parser/lib/index.js:4584:17)
    at Object.tsParseUnionOrIntersectionType (~/.npm/_npx/6657/lib/node_modules/ember-qunit-codemod/node_modules/@babel/parser/lib/index.js:4566:16)
    at Object.tsParseUnionTypeOrHigher (~/.npm/_npx/6657/lib/node_modules/ember-qunit-codemod/node_modules/@babel/parser/lib/index.js:4588:17)
    at Object.tsParseNonConditionalType (~/.npm/_npx/6657/lib/node_modules/ember-qunit-codemod/node_modules/@babel/parser/lib/index.js:4741:17)
All done.
Results:
1 errors
49 unmodified
0 skipped
0 ok
Time elapsed: 9.958seconds
Finished running command 1 of 1
Finished running codemod ember-qunit-codemod
...

test/index.html was generated by ember-cli 3.12.0 and has not been modified.

$ head -n2 tests/index.html
<!DOCTYPE html>
<html>

A complete log with DEBUG set is attached.
ember-cli-update-debug.log

@rwjblue
Copy link
Member

rwjblue commented Sep 30, 2019

The rough steps to fix this are to update codemod-cli to the latest version. rwjblue/codemod-cli#62 introduced the ability to run the codemod on only the specific extensions that are known (defaulting to js,ts). That should avoid the issue for us here...

@rwjblue rwjblue added the bug label Sep 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants