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

Allow user to pass in package URL for package reading #182

Merged
merged 14 commits into from May 5, 2021

Conversation

LitoMore
Copy link
Sponsor Contributor

@LitoMore LitoMore commented Apr 29, 2021

Related to #176

Changes

  • Add importMeta option for allowing users to pass in their package URL
  • Apply importMeta option to all the test code

Spec

  • importMeta is required
  • Its value should be import.meta

@LitoMore
Copy link
Sponsor Contributor Author

We already have a pkg option for users to pass in their package object, what about let users read the package at their side, then pass it to our package?

index.js Outdated Show resolved Hide resolved
@sindresorhus
Copy link
Owner

I think we should accept import.meta, not import.meta.url. import.meta might get useful properties we might want to use in the future. It's more future proof this way. We can just call the option importMeta and make it required.

index.js Outdated Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
LitoMore and others added 4 commits May 3, 2021 11:46
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
index.js Outdated Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
LitoMore and others added 4 commits May 4, 2021 20:29
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
index.d.ts Outdated Show resolved Hide resolved
LitoMore and others added 3 commits May 5, 2021 11:24
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
@sindresorhus sindresorhus merged commit 0c11c39 into sindresorhus:main May 5, 2021
@LitoMore LitoMore deleted the pass-in-cwd branch May 5, 2021 15:09
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.

None yet

2 participants