alfa
alfa copied to clipboard
Modernize Typescript configuration
Set up from 2017 doesn't work that well in modern development, see, e.g., Choosing compiler options. Alfa:
- [x] Change TS
module
fromcommonjs
tonode16
. This is the recommended setting for libraries. It will imply updating all internal imports to include extension. - [x] Add
verbatimModuleSyntax
to TS config. - [x] Change TS
target
toes2022
. Features are supported by all browsers (except IE) since several versions ago. - [x] Generate files in
dist
rather thansrc
. Seems to be better practice now 🤔 - [x] Switch JS generation from CJS to ESM. ESM is part of the language specification, so should be used instead.
- [x] Clean up
jsxImportSource
. - [x] Clean up
import {h}
,import … from "…/native"
and others usingdist
. Clean uppackage.json
exportingdist
entry points. - [x] setup correct
exports
inalfa-web
(native
) - [ ] ~Consider using correct imports from self-module rather than
../dist
in tests.~ - [ ] ~Clean up knip config ignoring a file in
alfa-cascade
, likely due to adist
setup?~ - [x] Update knip?
- [x] Update chalk
Alfa-integrations:
- [x] Change TS
module
fromcommonjs
tonode16
. This is the recommended setting for libraries. It will imply updating all internal imports to include extension. - [x] Add
verbatimModuleSyntax
to TS config. - [x] Change TS
target
toes2022
. Features are supported by all browsers (except IE) since several versions ago. - [x] Generate files in
dist
rather thansrc
. Seems to be better practice now 🤔 - [x] Switch JS generation from CJS to ESM. ESM is part of the language specification, so should be used instead.
- [x] Clean up
jsxImportSource
. - [x] Clean up
import {h}
,import … from "…/native"
and others usingdist
. Clean uppackage.json
exportingdist
entry points. - [ ] ~Consider using correct imports from self-module rather than
../dist
in tests.~ - [x] Update knip? => we need to have
alfa-cli
generates its files in another directory, which actually just means moving them tosrc
and generate inbin
where they already are. - [x] Re-enable TS config validation in
validate-structure
.
Alfa-companion:
- [x] Change TS
module
fromcommonjs
tonode16
. This is the recommended setting for libraries. It will imply updating all internal imports to include extension. - [x] Add
verbatimModuleSyntax
to TS config. - [x] Change TS
target
toes2022
. Features are supported by all browsers (except IE) since several versions ago. - [x] Generate files in
dist
rather thansrc
. Seems to be better practice now 🤔 - [x] Switch JS generation from CJS to ESM. ESM is part of the language specification, so should be used instead.
- [x] Clean up
jsxImportSource
. - [x] Clean up
import {h}
,import … from "…/native"
and others usingdist
. Clean uppackage.json
exportingdist
entry points. - [ ] ~Consider using correct imports from self-module rather than
../dist
in tests.~ - [x] Update knip?
Alfa-examples:
- [ ] Change TS
module
fromcommonjs
tonode16
. This is the recommended setting for libraries. It will imply updating all internal imports to include extension. - [ ] Add
verbatimModuleSyntax
to TS config. - [ ] Change TS
target
toes2022
. Features are supported by all browsers (except IE) since several versions ago. - [ ] Switch JS generation from CJS to ESM. ESM is part of the language specification, so should be used instead.
- [ ] Clean up
jsxImportSource
. - [ ] Clean up
import {h}
,import … from "…/native"
and others usingdist
. Clean uppackage.json
exportingdist
entry points. - [ ] ~Consider using correct imports from self-module rather than
../dist
in tests.~ - [x] Update knip?
Alfa-act-r:
- [x] Change TS
module
fromcommonjs
tonode16
. This is the recommended setting for libraries. It will imply updating all internal imports to include extension. - [x] Add
verbatimModuleSyntax
to TS config. - [x] Change TS
target
toes2022
. Features are supported by all browsers (except IE) since several versions ago. - [x] Switch JS generation from CJS to ESM. ESM is part of the language specification, so should be used instead.
- [x] Clean up
jsxImportSource
. - [x] Clean up
import {h}
,import … from "…/native"
and others usingdist
. Clean uppackage.json
exportingdist
entry points. - [x] Update knip?