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

Minified date file has to be the newest of input files #671

Closed
espinosa opened this issue Feb 15, 2024 · 5 comments
Closed

Minified date file has to be the newest of input files #671

espinosa opened this issue Feb 15, 2024 · 5 comments

Comments

@espinosa
Copy link

espinosa commented Feb 15, 2024

Actually, when I minify, the minified file has the date of the first input file.
Can you set the date of the newest file input ?

@tdewolff
Copy link
Owner

I agree that it shouldn't be plainly the first input that dictates the date, but I'd argue it should be the newest date of all inputs, and not the oldest. The newest date reflects the last date it was modified, and so was the minified result modified at that same date for the last time as well.

What use-case do you have that requires the oldest date?

@espinosa
Copy link
Author

You are right, it's the newest, not the oldest. I have changed the issue.

@espinosa espinosa changed the title Minified date file has to be the oldest of input files Minified date file has to be the newest of input files Feb 15, 2024
tdewolff added a commit that referenced this issue Feb 16, 2024
…ndle; allow setting preserve with --bundle; add warnings when ownership/permissions differ between input files when using --bundle; see #671
@tdewolff
Copy link
Owner

This only affects when using --bundle but isn't trivial to solve. For one, the file permissions and ownership preservation may not work for --bundle if the files have different permissions/ownership values. Should we just pick the first source file? For modification time we pick the latest (newest), but what about access time, should we pick the latest (newest) too?

But crucially, what about the parent directories? If we have two input files, one deeper nested than the other, how do we set the file attributes on the output directories that are created?

I've implemented this to throw a warning if ownership/permissions differ between input files, and pick the latest atime/mtime. For the parent directories I'll only use the first input file (not sure if this is correct).

@tdewolff
Copy link
Owner

Disregard that last statement. There are no destination directories created corresponding to source directories, so this doesn't apply. It will only preserve the file when using --bundle.

This issue is now fixed, please let me know if it works well for you.

@espinosa
Copy link
Author

Thanks for the quick change

kodiakhq bot pushed a commit to cloudquery/codegen that referenced this issue Mar 1, 2024
)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) | indirect | patch | `v2.20.16` -> `v2.20.18` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

---

### Release Notes

<details>
<summary>tdewolff/minify (github.com/tdewolff/minify/v2)</summary>

### [`v2.20.18`](https://github.com/tdewolff/minify/releases/tag/v2.20.18)

[Compare Source](https://github.com/tdewolff/minify/compare/v2.20.17...v2.20.18)

-   [cmd: fix --watch functionality,](https://github.com/tdewolff/minify/commit/1508f98414a1b1398639d8fe38816e99da51859e) [fixes](https://github.com/tdewolff/minify/commit/1508f98414a1b1398639d8fe38816e99da51859e) [tdewolff/minify#672

### [`v2.20.17`](https://github.com/tdewolff/minify/releases/tag/v2.20.17)

[Compare Source](https://github.com/tdewolff/minify/compare/v2.20.16...v2.20.17)

-   [cmd: output statistics now have fixed length, removing dependency on go-humanize](https://github.com/tdewolff/minify/commit/f27fd34c5315594bcb80c2d3f75b617925415d32)
-   [cmd: choose newest atime/mtime to preserve timestamps when using --bundle; allow setting preserve with --bundle; add warnings when ownership/permissions differ between input files when using --bundle; see](https://github.com/tdewolff/minify/commit/6b9175d2baee924112fab94ff601547d7fb99bbf) [tdewolff/minify#671
-   [cmd: don't preserve parent directories for --bundle, see](https://github.com/tdewolff/minify/commit/c754bf52bd6cf6ea65ce52d88204e37aebd0228d) [tdewolff/minify#671
-   [HTML: keep original attribute quote for all attributes,](https://github.com/tdewolff/minify/commit/a72c2ec610988130ae82e34cea4466a06a16457c) [fixes](https://github.com/tdewolff/minify/commit/a72c2ec610988130ae82e34cea4466a06a16457c) [tdewolff/minify#670
-   [JS: fix precedence of OptionalChaining expression](https://github.com/tdewolff/parse/commit/3b2a162fdb5403e0e8fd3e120da653375f970265)
-   [JS: fix parsing of 'export default expr' where expression can only be an assignment expression](https://github.com/tdewolff/parse/commit/3381c44c56c03890f434f45d0ecca109ffe6a24b)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIyMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
kodiakhq bot pushed a commit to cloudquery/filetypes that referenced this issue Mar 1, 2024
)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) | indirect | patch | `v2.20.16` -> `v2.20.18` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

---

### Release Notes

<details>
<summary>tdewolff/minify (github.com/tdewolff/minify/v2)</summary>

### [`v2.20.18`](https://github.com/tdewolff/minify/releases/tag/v2.20.18)

[Compare Source](https://github.com/tdewolff/minify/compare/v2.20.17...v2.20.18)

-   [cmd: fix --watch functionality,](https://github.com/tdewolff/minify/commit/1508f98414a1b1398639d8fe38816e99da51859e) [fixes](https://github.com/tdewolff/minify/commit/1508f98414a1b1398639d8fe38816e99da51859e) [tdewolff/minify#672

### [`v2.20.17`](https://github.com/tdewolff/minify/releases/tag/v2.20.17)

[Compare Source](https://github.com/tdewolff/minify/compare/v2.20.16...v2.20.17)

-   [cmd: output statistics now have fixed length, removing dependency on go-humanize](https://github.com/tdewolff/minify/commit/f27fd34c5315594bcb80c2d3f75b617925415d32)
-   [cmd: choose newest atime/mtime to preserve timestamps when using --bundle; allow setting preserve with --bundle; add warnings when ownership/permissions differ between input files when using --bundle; see](https://github.com/tdewolff/minify/commit/6b9175d2baee924112fab94ff601547d7fb99bbf) [tdewolff/minify#671
-   [cmd: don't preserve parent directories for --bundle, see](https://github.com/tdewolff/minify/commit/c754bf52bd6cf6ea65ce52d88204e37aebd0228d) [tdewolff/minify#671
-   [HTML: keep original attribute quote for all attributes,](https://github.com/tdewolff/minify/commit/a72c2ec610988130ae82e34cea4466a06a16457c) [fixes](https://github.com/tdewolff/minify/commit/a72c2ec610988130ae82e34cea4466a06a16457c) [tdewolff/minify#670
-   [JS: fix precedence of OptionalChaining expression](https://github.com/tdewolff/parse/commit/3b2a162fdb5403e0e8fd3e120da653375f970265)
-   [JS: fix parsing of 'export default expr' where expression can only be an assignment expression](https://github.com/tdewolff/parse/commit/3381c44c56c03890f434f45d0ecca109ffe6a24b)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIyMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
kodiakhq bot pushed a commit to cloudquery/plugin-pb-go that referenced this issue Mar 1, 2024
)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) | indirect | patch | `v2.20.16` -> `v2.20.18` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

---

### Release Notes

<details>
<summary>tdewolff/minify (github.com/tdewolff/minify/v2)</summary>

### [`v2.20.18`](https://github.com/tdewolff/minify/releases/tag/v2.20.18)

[Compare Source](https://github.com/tdewolff/minify/compare/v2.20.17...v2.20.18)

-   [cmd: fix --watch functionality,](https://github.com/tdewolff/minify/commit/1508f98414a1b1398639d8fe38816e99da51859e) [fixes](https://github.com/tdewolff/minify/commit/1508f98414a1b1398639d8fe38816e99da51859e) [tdewolff/minify#672

### [`v2.20.17`](https://github.com/tdewolff/minify/releases/tag/v2.20.17)

[Compare Source](https://github.com/tdewolff/minify/compare/v2.20.16...v2.20.17)

-   [cmd: output statistics now have fixed length, removing dependency on go-humanize](https://github.com/tdewolff/minify/commit/f27fd34c5315594bcb80c2d3f75b617925415d32)
-   [cmd: choose newest atime/mtime to preserve timestamps when using --bundle; allow setting preserve with --bundle; add warnings when ownership/permissions differ between input files when using --bundle; see](https://github.com/tdewolff/minify/commit/6b9175d2baee924112fab94ff601547d7fb99bbf) [tdewolff/minify#671
-   [cmd: don't preserve parent directories for --bundle, see](https://github.com/tdewolff/minify/commit/c754bf52bd6cf6ea65ce52d88204e37aebd0228d) [tdewolff/minify#671
-   [HTML: keep original attribute quote for all attributes,](https://github.com/tdewolff/minify/commit/a72c2ec610988130ae82e34cea4466a06a16457c) [fixes](https://github.com/tdewolff/minify/commit/a72c2ec610988130ae82e34cea4466a06a16457c) [tdewolff/minify#670
-   [JS: fix precedence of OptionalChaining expression](https://github.com/tdewolff/parse/commit/3b2a162fdb5403e0e8fd3e120da653375f970265)
-   [JS: fix parsing of 'export default expr' where expression can only be an assignment expression](https://github.com/tdewolff/parse/commit/3381c44c56c03890f434f45d0ecca109ffe6a24b)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIyMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
kodiakhq bot pushed a commit to cloudquery/plugin-sdk that referenced this issue Mar 1, 2024
…1546)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) | indirect | patch | `v2.20.16` -> `v2.20.18` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

---

### Release Notes

<details>
<summary>tdewolff/minify (github.com/tdewolff/minify/v2)</summary>

### [`v2.20.18`](https://github.com/tdewolff/minify/releases/tag/v2.20.18)

[Compare Source](https://github.com/tdewolff/minify/compare/v2.20.17...v2.20.18)

-   [cmd: fix --watch functionality,](https://github.com/tdewolff/minify/commit/1508f98414a1b1398639d8fe38816e99da51859e) [fixes](https://github.com/tdewolff/minify/commit/1508f98414a1b1398639d8fe38816e99da51859e) [tdewolff/minify#672

### [`v2.20.17`](https://github.com/tdewolff/minify/releases/tag/v2.20.17)

[Compare Source](https://github.com/tdewolff/minify/compare/v2.20.16...v2.20.17)

-   [cmd: output statistics now have fixed length, removing dependency on go-humanize](https://github.com/tdewolff/minify/commit/f27fd34c5315594bcb80c2d3f75b617925415d32)
-   [cmd: choose newest atime/mtime to preserve timestamps when using --bundle; allow setting preserve with --bundle; add warnings when ownership/permissions differ between input files when using --bundle; see](https://github.com/tdewolff/minify/commit/6b9175d2baee924112fab94ff601547d7fb99bbf) [tdewolff/minify#671
-   [cmd: don't preserve parent directories for --bundle, see](https://github.com/tdewolff/minify/commit/c754bf52bd6cf6ea65ce52d88204e37aebd0228d) [tdewolff/minify#671
-   [HTML: keep original attribute quote for all attributes,](https://github.com/tdewolff/minify/commit/a72c2ec610988130ae82e34cea4466a06a16457c) [fixes](https://github.com/tdewolff/minify/commit/a72c2ec610988130ae82e34cea4466a06a16457c) [tdewolff/minify#670
-   [JS: fix precedence of OptionalChaining expression](https://github.com/tdewolff/parse/commit/3b2a162fdb5403e0e8fd3e120da653375f970265)
-   [JS: fix parsing of 'export default expr' where expression can only be an assignment expression](https://github.com/tdewolff/parse/commit/3381c44c56c03890f434f45d0ecca109ffe6a24b)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIyMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
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

No branches or pull requests

2 participants