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 use of yarn pack #1019

Closed
mimarz opened this issue Nov 1, 2023 · 3 comments · Fixed by #1507
Closed

Fix use of yarn pack #1019

mimarz opened this issue Nov 1, 2023 · 3 comments · Fixed by #1507
Assignees
Labels
⚙️ technical Technical improvements, maintenance or other issues that are not directly linked to a feature

Comments

@mimarz
Copy link
Collaborator

mimarz commented Nov 1, 2023

We currently have a folder called node_modules in our dist for when a package is built. This folder contains the version of our packages used internally which is needed for components in our library.

We have hit an unfortunate snag where yarn pack ignores any folder named node_modules when packing, making its tarballs broken.

Investigate the following options:

  • Figure out if we can overwrite this ignore feature in yarn pack.
  • Maybe rename the built node_modules folder to something else?
  • If yarn pack cant be fixed. Remove the script pack:react in our root
@mimarz mimarz converted this from a draft issue Nov 1, 2023
@mimarz mimarz moved this from 🔵 Inbox to 📄 Todo in Team Designsystemet Nov 1, 2023
@mimarz mimarz added the ⚙️ technical Technical improvements, maintenance or other issues that are not directly linked to a feature label Nov 1, 2023
@Barsnes
Copy link
Member

Barsnes commented Nov 2, 2023

I have been investigating this, and it seems like it is meant to ignore any folders with the name node_modules.
As can be seen here.

It was mentioned in this yarnpkg/yarn#2063 and then again in yarnpkg/yarn#5966, which should have a merged a fix for it, but the fix with bundledDependencies does not seem to work today.

As @mimarz mentioned, we should probably remove yarn pack:react. npm pack will contain node_modules, so I suggest using that.

@Barsnes
Copy link
Member

Barsnes commented Dec 7, 2023

@mimarz I think we can pick this back up now that we have Yarn 4. @Albertlarsen maybe you could take a look, since you did the update?

@mrosvik mrosvik added this to the 4. Lansere versjon 1.0.0 milestone Jan 30, 2024
@mimarz
Copy link
Collaborator Author

mimarz commented Jan 30, 2024

Suggest we remove the pack:react which uses yarn pack and call it a day.

@Barsnes Barsnes moved this from 📄 Todo to 🏗 In progress in Team Designsystemet Feb 7, 2024
@Barsnes Barsnes moved this from 🏗 In progress to 👀 Ready for review in Team Designsystemet Feb 7, 2024
@github-project-automation github-project-automation bot moved this from 👀 Ready for review to ✅ Done in Team Designsystemet Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ technical Technical improvements, maintenance or other issues that are not directly linked to a feature
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants