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

Make async available in named export #383

Merged
merged 1 commit into from
May 14, 2023

Conversation

josh-hemphill
Copy link
Contributor

What is the purpose of this pull request?

For people using ESM projects, assigning to export = FastGlob makes default import impossible without TSC interop interceding for it.
Ideally, the export signature should change, but that would be a breaking change.

What changes did you make? (Give an overview)

So for now, and to make the export signature more consistent anyway, I'm proposing just adding the async implementation to the named exports, which happens to also be best-practice for ESM.

@mrmlnc mrmlnc added this to the 3.x.x milestone Apr 30, 2023
@mrmlnc mrmlnc modified the milestones: 3.x.x, 3.3.0 May 13, 2023
@mrmlnc mrmlnc merged commit cc5e9cc into mrmlnc:master May 14, 2023
@mrmlnc
Copy link
Owner

mrmlnc commented May 14, 2023

@josh-hemphill, thanks for the contributing 🎉

Will be shipped with 3.3.0.

I also create #397 to simplify the life of developers.

renovate bot referenced this pull request in redwoodjs/redwood Aug 2, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [fast-glob](https://github.com/mrmlnc/fast-glob) | [`3.2.12` ->
`3.3.1`](https://renovatebot.com/diffs/npm/fast-glob/3.2.12/3.3.1) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/fast-glob/3.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/fast-glob/3.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/fast-glob/3.2.12/3.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/fast-glob/3.2.12/3.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>mrmlnc/fast-glob (fast-glob)</summary>

### [`v3.3.1`](https://github.com/mrmlnc/fast-glob/releases/tag/3.3.1)

[Compare
Source](https://github.com/mrmlnc/fast-glob/compare/3.3.0...3.3.1)

> **Full Changelog**:
mrmlnc/fast-glob@3.3.0...3.3.1

This release fixes a regression for cases where the `ignore` option is
used with a string
([#&#8203;403](https://github.com/mrmlnc/fast-glob/issues/403),
[#&#8203;404](https://github.com/mrmlnc/fast-glob/issues/404)).

The public interface of this package does not support a string as the
value for the [`ignore`
option](https://github.com/mrmlnc/fast-glob#ignore) since 2018 year
([release](https://github.com/mrmlnc/fast-glob/releases/tag/2.0.0)).

So, in the next major release, we will reintroduce method
implementations that do not involve strings in the `ignore` option.

### [`v3.3.0`](https://github.com/mrmlnc/fast-glob/releases/tag/3.3.0)

[Compare
Source](https://github.com/mrmlnc/fast-glob/compare/3.2.12...3.3.0)

> **Full Changelog**:
mrmlnc/fast-glob@3.2.12...3.3.0

#### 🚀 Improvements

**Method aliases**

New methods (`glob`, `globSync`, `globStream`) have been added in
addition to the current methods (default import, `sync`, `stream`),
which eliminate the need to rename the method when importing. In
addition, an `async` alias has been added for the default import, which
makes it possible to use this packet with ESM.

**Method to convert paths to globs**

A new method (`convertPathToPattern`) has been added in this release to
convert a path to a pattern. The primary goal is to enable users to
avoid processing Windows paths in each location where this package is
used by utilities from third-party packages.

See more details in the [pull
request](https://github.com/mrmlnc/fast-glob/pull/392).

#### 🐛 Bug fixes

- In the past, we mishandled patterns that contained slashes when the
`baseNameMatch` option was enabled, which went against the documented
behavior.
([#&#8203;312](https://github.com/mrmlnc/fast-glob/issues/312))
- Several problems with matching patterns that contain brace expansion
have been resolved. The primary issue solved is when the pattern has
duplicate slashes after it is expanded
([#&#8203;394](https://github.com/mrmlnc/fast-glob/issues/394)), or
the `micromatch` package does not correctly generate a regular
expression
([#&#8203;365](https://github.com/mrmlnc/fast-glob/issues/365)).
- All negative patterns will now have the `dot` option enabled when
matching paths. Previously, the `!**/*` patterns did not exclude hidden
files (start with a dot).
([#&#8203;343](https://github.com/mrmlnc/fast-glob/issues/343))
- The issue that led to duplicates in the results when overlapping or
duplicate patterns were present among the patterns has been fixed. At
the moment, we are only talking about leading dot. Other cases are not
included. For example, running with the patterns `['./file.md',
'file.md', '*']` will now only include `file.md` once in the results.
([#&#8203;190](https://github.com/mrmlnc/fast-glob/issues/190))

#### 📖 Documentation

A [clarifying
note](https://github.com/mrmlnc/fast-glob/blob/master/README.md#concurrency)
has been added for the `concurrency` option, which provides more
detailed information about the Thread Pool utilization.

#### ⚙️ Infrastructure

-   The benchmark in CI is now running on Node.js 20.
- The benchmark now uses the public package
[bencho](https://github.com/mrmlnc/bencho) instead of an in-house
implementation. You may want to try this solution for your packages and
provide feedback.

#### 🥇 New Contributors

- [@&#8203;josh-hemphill](https://github.com/josh-hemphill) made their
first contribution in
[https://github.com/mrmlnc/fast-glob/pull/383](https://github.com/mrmlnc/fast-glob/pull/383)
- [@&#8203;mairaw](https://github.com/mairaw) made their first
contribution in
[https://github.com/mrmlnc/fast-glob/pull/401](https://github.com/mrmlnc/fast-glob/pull/401)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

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

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

---

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

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/redwoodjs/redwood).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4yNy4xIiwidXBkYXRlZEluVmVyIjoiMzYuMjcuMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants