GetJobber / atlantis

🔱 Atlantis
https://atlantis.getjobber.com
MIT License
27 stars 30 forks source link

fix(components): Fixing NPM Link within Atlantis #2118

Open scotttjob opened 1 week ago

scotttjob commented 1 week ago

Motivations

We've heard varying reports of npm link not working with Atlantis.

We want npm link to be functional. The change in this PR seems to make it functional.

Try it out and let us know!

Changes

Shipped jobber/formatters as ESM.

Testing

You should be able to use npm link in this branch without error and have your experience update on build

Changes can be tested via Pre-release


In Atlantis we use Github's built in pull request reviews.

Random photo of Atlantis

cloudflare-workers-and-pages[bot] commented 1 week ago

Deploying atlantis with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0e14791
Status: âœ…  Deploy successful!
Preview URL: https://8ec22bc6.atlantis.pages.dev
Branch Preview URL: https://scott-th-fixing-npm-link.atlantis.pages.dev

View logs

nad182 commented 5 days ago

Just chiming in, since I did a lot of stuff locally to make it semi functional. There are multiple steps necessary.

  1. Updating node version in Atlantis to 20+ OR removing engine-strict=true from .npmrc in repos where you're trying to link Atlantis.
  2. Fixing dependencies between Atlantis packages, since there were issues when I imported an Atlantis component, which used Atlantis hooks, formatters or design imports. These dependencies don't seem to be built appropriately, so their exported methods were undefined. Perhaps, an issue with "path-ing".
  3. When I tried it, I had to link multiple Atlantis packages separately. Since if you linked just components, for example, chances are the one or more components on the page use something from hooks, formatters or any other Atlantis package imports.
  4. There were some issues due to different package managers (npm vs pnpm), but I don't remember exactly what they were and how I got around them.