-
Notifications
You must be signed in to change notification settings - Fork 6
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
Feature Request: Flag to work with yarn workspace #4
Comments
The issue seems to be around symlink packages. |
@expelledboy I see the issue. Currently the cli is attempting to resolve all dependencies in the package.json from the provided yarn.lock file. However as this is using yarn workspaces there is no entry and it is only sym linked. If I add an option or flag would the expected behaviour be to ignore any workspace items? This would remove the locking for that particular package. |
So I have run some tests. Indeed the workspace is not locked in top level However what we are trying to achieve is generating a lock file as if not in a workspace, so are
Looks like there are. So you would need to inspect the version pointed to by the |
@expelledboy I don't think pointing to a local file is the normal use case here. I will see what I can pull together in a sample repo that may work for this, but there are a few edge cases I am worried about. For example: Do we want to resolve to the version at install time or the version that is in the repo when we run our tests / build each time? Or do we expect some other behaviour? |
Well as we dont actually have the ability to "use" a locked version I would say when you run |
Hey folks, any idea if this package should work these days in a monorepo? That's still the best solution to yarnpkg/berry#1223 and yarnpkg/yarn#5428, there is also this package but a big too complex: https://github.com/JanVoracek/yarn-plugin-entrypoint-lockfiles |
@eric-burel I'm currently using this in a mono repo. That said each item is bundled / packaged locally into a single file using rollup. This package is to create a lock file for external dependencies. That said if you wanted to "lock" in a local package you need to either publish it and install it locally or zip your local version and install using a file path to the zip. Is the use case here to lock in the dependencies in the local package? |
Glad that you still use it then! So my idea is to generate |
@eric-burel You should be able to do this with the |
Hi, I am htting an error: yarn generate-lockfile --lockfile ./yarn.lock --package ./starters/remix/ --write --dev
Error: SyntaxError: Unknown token: { line: 3, col: 2, type: 'INVALID', value: undefined } 3:2 in lockfile You can reproduce by running this command in this repo: https://github.com/VulcanJS/vulcan-npm (after a yarn install). It seems related to the yarn.lock not being readable, at least the first few lines:
I am using Yarn 3 so maybe the structure changed over time |
@eric-burel I took a small look at support v3 but I was unable to get it fully working in the limited time I had. If you want to take a look / contribute to the WIP branch go for it -> https://github.com/varsis/generate-lockfile/pull/9/files It's currently able to resolve the majority of the dependencies but I am still missing a few of them from the lockfile. Maybe they can be ignored? For the future of this project / idea I think it would be better suited as a yarn plugin (https://yarnpkg.com/features/plugins) |
If you plan to create a Yarn plugin, maybe it would be better to contribute to: https://github.com/JanVoracek/yarn-plugin-entrypoint-lockfiles It mostly works, except that the generated lock seems slightly "out of date" or off, it doesn't work with See yarnpkg/berry#1223 (comment) for more details, and I demo a setup here: https://github.com/VulcanJS/vulcan-npm/pull/132/files |
I am trying to use this with
firebase-tools
in a yarn monorepo.To solve the issue where firebase assumes I have
@org/common
pointing directly to the workspacefiles:../common
.The text was updated successfully, but these errors were encountered: