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: precompress filter #10185

Merged
merged 14 commits into from
Jun 23, 2023
Merged

fix: precompress filter #10185

merged 14 commits into from
Jun 23, 2023

Conversation

gtm-nayan
Copy link
Contributor

@gtm-nayan gtm-nayan commented Jun 18, 2023

closes #10184

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Sorry, something went wrong.

@changeset-bot
Copy link

changeset-bot bot commented Jun 18, 2023

🦋 Changeset detected

Latest commit: 853d02a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@ghostdevv ghostdevv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You beat me to the punch! Only other issue here is that the tiny glob function returned absolute paths which list_files does not, breaking compress_file. I initially fixed that with .map(f => resolve(directory, f))

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Co-authored-by: Willow (GHOST) <ghostdevbusiness@gmail.com>

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
import { fileURLToPath } from 'node:url';
import { expect, test } from 'vitest';
import { assert, expect, test } from 'vitest';
import glob from 'tiny-glob/sync.js';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how does this work still? is this test actually being run or is it being pulled in as a transitive dependency from some other package?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This had me spinning around for a good 15 minutes. Turns out it's a workspace dependency so it's available in all packages in the repository.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, I wonder if that caused us not to notice some of these issues because it was available there, but not in end user projects

would you mind removing it as a workspace dependency? you can make it a devDependency of this project. we've tried to avoid workspace dependencies in favor of per-project dependencies except for stuff like eslint and prettier

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What package should become a devDependency? Lost on context

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oop, forgot about this one, tiny-glob should be moved to the kit devDependencies instead of workspace but I think we can just get rid of it altogether.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you do that so we can finish and merge the PR?

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@dummdidumm dummdidumm merged commit 96c9237 into master Jun 23, 2023
@dummdidumm dummdidumm deleted the fix-precompress-filter branch June 23, 2023 09:15
@github-actions github-actions bot mentioned this pull request Jun 23, 2023
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.

precompress option not working since 1.20.3
4 participants