jspm / generator

JSPM Import Map Generator
Apache License 2.0
166 stars 21 forks source link

feat: translate locks to default provider during input map extraction #253

Closed Bubblyworld closed 1 year ago

Bubblyworld commented 1 year ago

Fixes #249. When extracting locks from the input map the generator now automatically translates any locks from a non-default provider to the default provider, in a best-effort fashion.

This makes swapping providers have much more intuitive behaviour, I'll link a screenshot. If we solve #250 to get rid of the trailing-slash mappings, then provider swapping will be super smooth.

Bubblyworld commented 1 year ago

I've also split tests into :integration: (the existing stuff) and :unit: (which is now for typescript tests colocated with the source, such as the new install/lock.tests.ts), and added conditional source exports to the package.json so we can access private exports for unit testing.

Bubblyworld commented 1 year ago
Screenshot 2023-03-07 at 11 04 08 Screenshot 2023-03-07 at 11 04 15 Screenshot 2023-03-07 at 11 15 01