Closed JayaKrishnaNamburu closed 11 months ago
Looks good thanks. Any idea about the CI failure? Note that most CLI operations should automatically pick up the local importmap.json
file without it needing to be provided via an explicit flag. Can we not do the same for the build?
Yes, the cli is picking the local build file by default. Needed only if we change the file name to something else than importmap.json
https://github.com/jspm/jspm-cli/blob/main/src/utils.ts#L213-L222
The CI failures are there for a while, should look into it. Something with assertions
Fixed tests for one use-case. There is another use-case that is failing for jspm install lit
from esm.sh
now. But i have a hunch it might not be realted to the generator.
Here is the error
Error: No './css-tag' exports subpath defined in https://esm.sh/*@lit/reactive-element@1.6.3/ resolving @lit/reactive-element/css-tag imported from https://esm.sh/v135/@lit/reactive-element@1.6.3/X-ZS8q/esnext/reactive-element.mjs.
Error: Scenario "jspm install lit -p esm.sh -e production" failed.
at runScenario (file:///home/runner/work/jspm-cli/jspm-cli/test/scenarios.ts:1:845)
at async runScenarios (file:///home/runner/work/jspm-cli/jspm-cli/test/scenarios.ts:1:444) {
[cause]: AssertionError [ERR_ASSERTION]: undefined == true
at Object.validationFn (file:///home/runner/work/jspm-cli/jspm-cli/test/providers.test.ts:1:1140)
at runScenario (file:///home/runner/work/jspm-cli/jspm-cli/test/scenarios.ts:1:790)
at async runScenarios (file:///home/runner/work/jspm-cli/jspm-cli/test/scenarios.ts:1:444) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: undefined,
expected: true,
operator: '=='
}
}
Unable to complete all tasks.
x test/providers.test.ts [24.707770[31](https://github.com/jspm/jspm-cli/actions/runs/7144479899/job/19458208881#step:7:32)s]
x :test:##
x :test
The package @lit/reactive-element
seems to create a export map with .js
extension. And maybe the us causing the issue when trying to access the same without extensions ?
https://unpkg.com/browse/@lit/reactive-element@2.0.2/package.json
Can we at least disable the test and post a new issue to reenable it? We can't land PRs if CI is failing...
Otherwise looks good to land and thanks for clarifying importmap.json
is already read by default.
Disabled esm.sh
provider and loged a bug with repro on the generator.
https://github.com/jspm/generator/issues/335
Adds
--map
option forjspm build
command. While moving thejspm-vscode
project to usejspm-cli
workflow. We will generate theimportmap.json
only once. And use it for re-runs or update it only when needed.So, when the extension is being built. We should use the existing map. Currently the
cli
throws an error because--map
is not allowed forbuild
command.Usage reference -> https://github.com/jspm/jspm-vscode/blob/refactor-build-workflow/chompfile.toml#L9
Eg