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 regression with workdir symlinks #1053

Merged
merged 2 commits into from
Oct 9, 2024
Merged

Conversation

deribaucourt
Copy link
Contributor

See my comment in #580 (comment)
While upgrading from vsce 2.3 to 3.1, I had this regression which prevented building my package.
I use the following package.json extract:

  "workspaces": [
    "src/lib"
  ]

And this folder is a symlink.

If a workdir was refering a symlink directory, we would pass it to yazl, which would error out because it's a directory.

glob recommends using follow: true to consider directory symlinks as directories in the collection.

If a workdir was refering a symlink directory, we would pass it to
yazl, which would error out because it's a directory.

glob recommends using `follow: true` to consider directory symlinks
as directories in the collection.
@ije
Copy link

ije commented Sep 28, 2024

i also failed to upgrade to 3.1, and i'm using a local package:

 "dependencies": {
    "typescript-esmsh-plugin": "./typescript-esmsh-plugin"
  }

@deribaucourt
Copy link
Contributor Author

deribaucourt commented Sep 30, 2024

Hello @ije, by using this PR you should be able to fix your issue.
Once it is merged, you can use the next official releases.

Download https:/deribaucourt/vscode-vsce/tree/main then build and package vsce and install that version in your workspace.

@benibenj
Copy link
Contributor

benibenj commented Oct 4, 2024

Thanks for looking into this. I feel we need to be a bit careful with this which is why I would propose to have this behind a cli argument. Maybe --follow-symlinks?

This new behavior fixes packaging with symlinks to directories in
extensions. We make it optional in case someone wants to keep the
intermediate behavior.
@deribaucourt
Copy link
Contributor Author

Thanks for your review @benibenj
I added a new configuration option for the commands package, ls and publish.
I did not test publish because I don't want to push right now, but the code is identical to the other commands.

@benibenj benibenj added this to the October 2024 milestone Oct 9, 2024
@benibenj benibenj merged commit 980d621 into microsoft:main Oct 9, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants