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

Support the files property in package.json #867

Closed
lorensr opened this issue May 18, 2023 · 7 comments · Fixed by #948
Closed

Support the files property in package.json #867

lorensr opened this issue May 18, 2023 · 7 comments · Fixed by #948
Assignees
Labels
feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@lorensr
Copy link

lorensr commented May 18, 2023

Currently, vsce ls ignores my files allowlist, which means the only way to configure which files are published is with the .vscodeignore denylist. Allowlists are safer and more maintainable than denylists, and files is the standard in the ecosystem. #12 is an older version of this feature request, and includes 15 upvotes for the workaround, which no longer works.

@joaomoreno
Copy link
Member

joaomoreno commented Jun 12, 2023

Sounds good. I suggest the following:

  • If no .vscodeignore file exists, the files property can be respected.
  • Otherwise, .vscodeignore is always respected.

@joaomoreno joaomoreno self-assigned this Jun 12, 2023
@joaomoreno joaomoreno added help wanted Issues identified as good community contribution opportunities feature-request Request for new features or functionality labels Jun 12, 2023
@JacksonTian
Copy link

The .vscodeignore is blocklist, the files is allowlist.

@ghost
Copy link

ghost commented Jan 5, 2024

I'd like to take this up @joaomoreno.

A minimal fix for this could be adding a allowlist parameter to the collectAllFiles function at

async function collectAllFiles(

i.e. if there exists a files property in the manifest then we filter out the output of the collectAllFiles function to only contain files from the allowlist. Would appreciate the guidance of the community on this.

@joaomoreno joaomoreno assigned benibenj and unassigned joaomoreno Mar 26, 2024
@joaomoreno joaomoreno added this to the April 2024 milestone Mar 26, 2024
@joaomoreno joaomoreno changed the title Respect the files property in package.json Support the files property in package.json Mar 27, 2024
@vanyauhalin
Copy link

@benibenj, thank you! Could you please let us know when we might be able to start using this?

@benibenj
Copy link
Contributor

@vanyauhalin We just released a new version which includes the change

@benibenj benibenj added verification-needed Verification of issue is requested and removed help wanted Issues identified as good community contribution opportunities labels Apr 22, 2024
@benibenj
Copy link
Contributor

@vanyauhalin Have you adopted the files property already? If so, can you confirm it works as intended?

@hediet hediet added the verified Verification succeeded label Apr 24, 2024
@vanyauhalin
Copy link

@benibenj Apologize for the delayed response. Works perfectly. Thank you.

lewxdev added a commit to lewxdev/vscode-glyph that referenced this issue Jul 10, 2024
as of `@vscode/[email protected]`, `vsce ls` supports the more minimal `files`
allowlist in `package.json` in addition to the `.vscodeignore` file.
this removes the need for a `.vscodeignore` file in the project root.
(the `@vscode/vsce` package has also been updated to `^2.25.0`.)

see: microsoft/vscode-vsce#867
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants