8000 package.json uses deprecated subpath folder mappings in exports · Issue #17 · jaydenseric/extract-files · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
package.json uses deprecated subpath folder mappings in exports #17
Closed
@tbroyer

Description

@tbroyer

package.json's exports uses subpath folder mappings (at https://github.com/jaydenseric/extract-files/blob/v9.0.0/package.json#L37), which is deprecated since Node v12.20.0 / v14.13.0, replaced with subpath patterns (which apparently exist since the beginning of exports maps too).
See https://nodejs.org/api/packages.html#packages_subpath_folder_mappings
The main difference is that the required paths have to exactly match, whether you use require() or import to get to the subpath (whereas with subpath folder mappings, the file extension will be automatically added when using require(), but not when using import).

Fwiw, see rollup/plugins#684 (comment) for the details of the Node algorithm applied to the specific case of require("extract-files/public/extractFiles").

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0