-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Change src imports to relative #3082
Conversation
Looks like CodeQL is failing on regex. 60 cases in test files. One in the Render setup command. For render, it's failing on For every other case, it's failing on @cannikin do you see a way to resolve these? I'm fine to dismiss them as "used in tests" for the applicable alerts. If there's a better way to handle the paths for Windows + Posix, we should look for other usage in the codebase as well. |
packages/cli/src/commands/destroy/scaffold/__tests__/scaffold.test.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this approach @jtoar, what I would suggest is completely disabling the src
alias in babel, searching for 'src/
and making sure that it's completely removed. It's safe to dismiss the CodeQL warnings.
As far as I know ESBuild already works with aliases if they're specified in the Which reminds me! The |
Good point - doing it now |
Will wait for @jtoar to wake up then merge. TS team high five ✋ |
The problem was that it wasn't transforming the paths last time I tried esbuild - there's an open issue for it on their repo. One for next release or post-v1 to re-investigate I suppose! |
It looks like it was closed in May 2020: evanw/esbuild#60, good news all round! |
It looks like it only works when you ARE bundling! Thanks for the heads up @dac09 |
For the paths one, I would think we could just give the path to the For the second one, we could do a little looser search, and just look for the string "user" all by itself on a line in the whole cell, rather than limiting the check to just the GraphQL query at the top of the cell. This assumes that nowhere else in the page does "user" appear on a line all by itself, which seems reasonable right now. Try removing line 323 and change 325 to: expect(cell).not.toMatch(/^\s+user$/m) |
d30959f
to
678172f
Compare
As an alternative to #3074, which adds a clean step to
rwfw project:sync
to get around the ttypescript error, we can solve the problem by not using ttypescript at all, getting rid of the transform altogether.Not having the transform makes for way-more awkward relative imports. This isn't super ideal, but it's a change that only affects framework developers. The alternative is migrating to ts-patch, which seems like it'll involve more config than ttypescript (which was basically zero).
Fixes #3054