Skip to content

Use source files as well to generate mappings#27

Merged
dmail merged 36 commits into
masterfrom
parsing
Mar 12, 2021
Merged

Use source files as well to generate mappings#27
dmail merged 36 commits into
masterfrom
parsing

Conversation

@dmail
Copy link
Copy Markdown
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
Copy Markdown

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