Skip to content

feat: context.resolve now returns string #2507

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tbrannam
Copy link

import.meta.resolve on node and browser returns a string - update implementation of createContext to match.

Runtime behavior of existing code should continue to work

old behavior

const url = await import.meta.resolve('./foo')

new behavior

const url = import.meta.resolve('./foo')

Runtime behavior may be backward compatible since awaiting a string results in a string.

Note that types for Node already reflect the new behavior.

BREAKING CHANGE: runtime behavior of import.meta.resolve changes from async to sync

import.meta.resolve on node and browser returns a string - update implemenation of createContext to match.

BREAKING CHANGE:  runtime behavior of import.meta.resolve changes from async to sync
Copy link

File size impact

Merging feature/breaking-context into main will impact 3 files in 2 groups.

browser (2/2)
File raw gzip brotli Event
dist/s.min.js -17 (7,954) 0 (3,148) +2 (2,864) modified
dist/system.min.js -17 (12,303) -4 (4,750) -7 (4,276) modified
Total size impact -34 (20,257) -4 (7,898) -5 (7,140)
node (1/1)
File raw gzip brotli Event
dist/system-node.cjs -17 (522,032) -2 (126,152) -69 (84,811) modified
Total size impact -17 (522,032) -2 (126,152) -69 (84,811)
extras (0/8)

No impact on files in extras group.

Generated by file size impact during size-impact#15120007271

@tbrannam
Copy link
Author

Not source compatible since value is not thenable

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.

1 participant