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

fix(path-alias): Fix aliasing of paths using ts/jsconfig #9574

Merged
merged 19 commits into from
Dec 27, 2023

Conversation

dac09
Copy link
Contributor

@dac09 dac09 commented Nov 24, 2023

I'm 90% sure this used to work when the original contribution was made (I remember testing it myself)

However this change is necessary for path aliases to work - regardless of whether the path alias is being used in Webpack, Vite, Storybook, Prerender or Jest

Fixes #8666

@dac09 dac09 added the release:fix This PR is a fix label Nov 24, 2023
@dac09 dac09 added this to the next-release-patch milestone Nov 24, 2023
…ath-aliases

* 'main' of github.com:redwoodjs/redwood: (23 commits)
  Add note about base 64 encoded event body (redwoodjs#9595)
  fix(deps): update graphql-tools monorepo (redwoodjs#9609)
  fix(deps): update dependency fs-extra to v11.2.0 (redwoodjs#9606)
  fix(deps): update dependency graphql-sse to v2.4.0 (redwoodjs#9607)
  fix(deps): update docusaurus monorepo to v3.0.1 (redwoodjs#9608)
  fix(deps): update babel monorepo (redwoodjs#9596)
  fix(deps): update dependency @whatwg-node/server to v0.9.18 (redwoodjs#9602)
  fix(deps): update dependency @apollo/client to v3.8.8 (redwoodjs#9600)
  chore: update yarn.lock
  chore(deps): update dependency @playwright/test to v1.40.1 (redwoodjs#9599)
  chore(deps): update dependency @supabase/supabase-js to v2.39.0 (redwoodjs#9603)
  fix(deps): update dependency @clerk/clerk-sdk-node to v4.12.22 (redwoodjs#9601)
  chore(deps): update dependency @clerk/clerk-react to v4.28.1 (redwoodjs#9598)
  fix(deps): update storybook monorepo to v7.6.2 (redwoodjs#9597)
  RSC: Generate a route manifest (redwoodjs#9592)
  chore(private-set): Wrap profile page in <PrivateSet> instead of Private (redwoodjs#9575)
  add documentation on mocking useParams in component test (redwoodjs#9284)
  Update Typescript to 5.3.2 (redwoodjs#9589)
  RSC: Refactor build process (redwoodjs#9588)
  fix(crwa): clarify docs to avoid issues in yarn modern installs (redwoodjs#9579)
  ...
…to fix/module-path-aliases

* 'fix/module-path-aliases' of github.com:dac09/redwood:
@dac09
Copy link
Contributor Author

dac09 commented Dec 1, 2023

@jtoar could I ask for your review on this please?

This sort of thing has edgecases that are easily missed, and I'd really like a second pair of eyes.

@dac09 dac09 requested a review from jtoar December 1, 2023 10:13
@dac09 dac09 assigned jtoar and dac09 Dec 1, 2023
Copy link
Contributor

@jtoar jtoar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Danny and I paired on this today, looks good

jtoar and others added 7 commits December 6, 2023 22:34
…ath-aliases

* 'main' of github.com:redwoodjs/redwood: (92 commits)
  chore(deps): update dependency @types/yargs to v17.0.32 (redwoodjs#9759)
  Make it easier to find useMatch docs (redwoodjs#9756)
  chore(unit tests): Use side-effect import to fix TS errors (redwoodjs#9754)
  fix(context): Refactor context (redwoodjs#9371)
  docs: Replaced deprecated <Set private> with PrivateSet within router.md (redwoodjs#9749)
  add TS support for storybook preview tsx config extension (redwoodjs#9309)
  fix(studio): Fix windows path issues (redwoodjs#9752)
  redwoodjs#9620: Update studio to support variable components (Mailer) (redwoodjs#9639)
  chore(tasks): Add comparison view to nmHoisting visualisation (redwoodjs#9751)
  chore(cli): make fs modules used in the CLI consistent (redwoodjs#9746)
  chore(tooling): Make sure console boxen print on a new line
  chore(CI): fix publish release candidate
  feat(CLI): add check node version middleware, rm `.nvmrc`, yarn engines (redwoodjs#9728)
  docs: added some clarification on serverless functions getting executed in a non-serverless environment (redwoodjs#9742)
  Fix sshExec() errors not displaying (redwoodjs#9743)
  chore(tooling): Add missing word in release tooling output
  Update Metadata docs (redwoodjs#9744)
  chore(CI): update test project fixture and CRWA for deploy target CI repo (redwoodjs#9730)
  chore(tooling): add script for getting nested dependency data (redwoodjs#9734)
  Trusted Documents docs: Proofreading corrections (redwoodjs#9737)
  ...
@dac09
Copy link
Contributor Author

dac09 commented Dec 27, 2023

@jtoar finally got the tests to pass. Turns out tsconfig parsing on windows is a little different to linux/macos. So I just added a check to only make the baseUrl absolute if it isn't already.

@dac09 dac09 enabled auto-merge (squash) December 27, 2023 08:34
@dac09 dac09 merged commit a06b6b2 into redwoodjs:main Dec 27, 2023
32 checks passed
@dac09 dac09 deleted the fix/module-path-aliases branch December 27, 2023 08:42
dac09 added a commit to dac09/redwood that referenced this pull request Dec 28, 2023
…p-prebuild

* 'main' of github.com:redwoodjs/redwood: (1608 commits)
  Docker: Update to work with corepack and yarn v4 (redwoodjs#9764)
  [RFC]: useRoutePaths (redwoodjs#9755)
  Adds a note about the two commands you will use with your schema to the top of the schema file (redwoodjs#8589)
  docs: Supertokens.md: Fix typo (redwoodjs#9765)
  Fix supertokens docs & integration issues (redwoodjs#9757)
  fix(apollo): Enhance error differently for Suspense Cells (redwoodjs#9640)
  SSR smoke-test: Use <Metadata /> (redwoodjs#9763)
  chore(deps): update dependency @types/qs to v6.9.11 (redwoodjs#9761)
  chore(ci): Better error handling in detectChanges.mjs (redwoodjs#9762)
  fix(path-alias): Fix aliasing of paths using ts/jsconfig (redwoodjs#9574)
  chore(deps): update dependency @types/yargs to v17.0.32 (redwoodjs#9759)
  Make it easier to find useMatch docs (redwoodjs#9756)
  chore(unit tests): Use side-effect import to fix TS errors (redwoodjs#9754)
  fix(context): Refactor context (redwoodjs#9371)
  docs: Replaced deprecated <Set private> with PrivateSet within router.md (redwoodjs#9749)
  add TS support for storybook preview tsx config extension (redwoodjs#9309)
  fix(studio): Fix windows path issues (redwoodjs#9752)
  chore(tasks): Add comparison view to nmHoisting visualisation (redwoodjs#9751)
  chore(cli): make fs modules used in the CLI consistent (redwoodjs#9746)
  ...
Tobbe pushed a commit that referenced this pull request Jan 1, 2024
Co-authored-by: Dominic Saadi <dominiceliassaadi@gmail.com>
@Tobbe Tobbe modified the milestones: next-release-patch, v6.6.1 Jan 1, 2024
Tobbe pushed a commit that referenced this pull request Jan 1, 2024
Co-authored-by: Dominic Saadi <dominiceliassaadi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:fix This PR is a fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug?]: Vite doesn't support ts path aliases
3 participants