Skip to content

Conversation

@guybedford
Copy link
Contributor

We don't currently document null targets in package "exports", which provide a useful exclude functionality when used in subpath patterns. This extends the subpath patterns docs with a short description and example of this behaviour.

@nodejs/modules

@ljharb
Copy link
Member

ljharb commented May 18, 2021

To confirm, this works with any node version that supports the object form?

@guybedford
Copy link
Contributor Author

@ljharb yes it's supported in all versions.

@guybedford guybedford requested a review from aduh95 May 19, 2021 12:11
Copy link
Contributor

@aduh95 aduh95 left a comment

Choose a reason for hiding this comment

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

Do we have a test for this? If not we probably should, but that's not blocking this PR anyway.

@guybedford
Copy link
Contributor Author

There's a bunch of these tests in https://github.com/nodejs/node/blob/master/test/fixtures/node_modules/pkgexports/package.json. Not for subpath patterns though, but it's a straightforward extension.

Copy link
Contributor

@DerekNonGeneric DerekNonGeneric left a comment

Choose a reason for hiding this comment

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

I vaguely remember you telling me about this on the call we had last year.

guybedford added a commit that referenced this pull request May 20, 2021
PR-URL: #38724 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is> Reviewed-By: James M Snell <jasnell@gmail.com>
@guybedford
Copy link
Contributor Author

Landed in 01940ee.

@guybedford guybedford closed this May 20, 2021
@guybedford guybedford deleted the null-pattern branch May 20, 2021 16:54
danielleadams pushed a commit that referenced this pull request May 31, 2021
PR-URL: #38724 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is> Reviewed-By: James M Snell <jasnell@gmail.com>
@danielleadams danielleadams mentioned this pull request May 31, 2021
richardlau pushed a commit that referenced this pull request Jul 16, 2021
PR-URL: #38724 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is> Reviewed-By: James M Snell <jasnell@gmail.com>
richardlau pushed a commit that referenced this pull request Jul 19, 2021
PR-URL: #38724 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is> Reviewed-By: James M Snell <jasnell@gmail.com>
richardlau pushed a commit that referenced this pull request Jul 20, 2021
PR-URL: #38724 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is> Reviewed-By: James M Snell <jasnell@gmail.com>
@richardlau richardlau mentioned this pull request Jul 20, 2021
foxxyz pushed a commit to foxxyz/node that referenced this pull request Oct 18, 2021
PR-URL: nodejs#38724 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is> Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants