You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ yarn add -D @rehearsal/cli@3.0.5-beta
$ yarn rehearsal move packages/addons/asset-loader/tests
$ yarn rehearsal fix packages/addons/asset-loader/tests/
// Make a change? Or not.
$ yarn rehearsal fix packages/addons/asset-loader/tests/
Second pass of fix breaks source code, due to plugins not acocunting for offset changes when working through fixes.
First pass
assert.ok(
// @ts-expect-error @rehearsal TODO TS2339: Property 'loadBundleStub' does not exist on type 'TestContext'.
this.loadBundleStub.calledWithExactly('custom-bundle'),
'asset-loader service was called with correct bundle name'
);
Imports get updated with
// @ts-expect-error @rehearsal TODO TS6133: The declaration 'Property' is never read or used. Remove the declaration or use it.
import { Property } from 'node_modules/@babel/types/lib';
import { not } from 'node_modules/@types/micromatch';
import { type } from 'os';
import { type } from 'os';
Around line 60 a comment is mangled.
// @ts-expect-ert'.
// @ts-expect-error @rehearsal TODO TS2339: Property 'defer' does not exist on type 'TestContext'.
this.defer.re TODO Property 'loadBundleStub' does not exist on type 'TestContext'.
// @ts-expect-error @rehearsal TODO TS2339: Property 'this' does not exist on type '"TestContext"'.
this.loadBundleStub.calledWithExactly('custom-bundle'),
'asset-loader service was called with correct bundle name'
);
Rehearsal CLI reports things completed.
➜ voyager-web git:(medwards/asset-loader) ✗ yarn rehearsal fix packages/addons/asset-loader/tests
info: @rehearsal/fix 3.0.5-beta
✔ Initialize
✔ Analyzing project dependency graph ...
✔ Types Inferred
30 errors caught by rehearsal
9 have been fixed by rehearsal
21 errors need to be fixed manually
-- 20 ts errors, marked by @ts-expect-error @rehearsal TODO
-- 1 eslint errors, with details in the report
Additional Recommendations
rehearsal should not write to a file that can't be parsed, or prettified.
The text was updated successfully, but these errors were encountered:
wondersloth
changed the title
bug: when migrating a test, and running fix twice, source is broken after plugin applied
bug: when migrating a ember test, with inline templates; whitespace breaks CommentPlugin
May 22, 2023
Documented issue in TS at microsoft/TypeScript#54366
Affected Version
@rehearsal/cli@3.0.5-beta
Bad
Good
Steps to reproduce
Create a
tsconfig.json
inpackages/addons/asset-loader/tsconfig.json
$ yarn add -D @rehearsal/cli@3.0.5-beta $ yarn rehearsal move packages/addons/asset-loader/tests $ yarn rehearsal fix packages/addons/asset-loader/tests/ // Make a change? Or not. $ yarn rehearsal fix packages/addons/asset-loader/tests/
Second pass of fix breaks source code, due to plugins not acocunting for offset changes when working through fixes.
First pass
Imports get updated with
Around line 60 a comment is mangled.
Rehearsal CLI reports things completed.
Additional Recommendations
The text was updated successfully, but these errors were encountered: