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

Use source files as well to generate mappings #27

Merged
merged 36 commits into from
Mar 12, 2021
Merged

Use source files as well to generate mappings #27

merged 36 commits into from
Mar 12, 2021

Conversation

dmail
Copy link
Member

@dmail dmail commented Mar 6, 2021

Summary of changes:

  • Autogenerate mappings for import without extension: Read main file and imported files recursively to find extensionless import and generate the mappings.
  • Update conditions resolution in package exports field to match Node.js behaviour
  • Rename getImportMapFromNodeModules -> getImportMapFromProjectFiles
  • Rename generateImportMapForProject -> writeImportMapFile
  • Add new param: dev
  • Add new param: runtime
  • Add support for importmap field in package.json (can be an object or string leading to a file)
  • Remove param projectPackageDevDependenciesIncluded (replaced by dev)
  • Remove param packageExportsPreference (replaced by dev + runtime)
  • Remove support for imports field in package.json (now it is ignored)
  • Add new param removeUnusedMappings (remove mappings generated from package.json files but not actually used in the codebase)
  • Add new param moduleFormat (no need to document this one, I doubt it will ever be useful to someone)
  • Updated documentation

There is many breaking changes, so next version is a major.

@codecov
Copy link

codecov bot commented Mar 6, 2021

Codecov Report

Merging #27 (c4a73f2) into master (413b6aa) will increase coverage by 4.86%.
The diff coverage is 79.19%.

@dmail dmail changed the title Parsing Use source files as well to generate mappings Mar 8, 2021
@dmail dmail marked this pull request as ready for review March 12, 2021 09:33
@dmail dmail merged commit fe283e2 into master Mar 12, 2021
@dmail dmail deleted the parsing branch March 12, 2021 16:44
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