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

(chore) Tweak tsconfig lib targets #227

Merged
merged 1 commit into from
Nov 22, 2024
Merged

Conversation

denniskigen
Copy link
Member

@denniskigen denniskigen commented Nov 22, 2024

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • My work conforms to the OpenMRS 3.0 Styleguide and design documentation.
  • My work includes tests or is validated by existing tests.

Summary

This PR tweaks the base TypeScript config to allow for better module resolution and better support for modern JavaScript features. Specifically, it removes extraneous lib targets. [dom, dom.iterable, esnext] should be sufficient for our setup.

es2018, es2020, es2021, and es2022 are cumulative - each one includes all the previous ones. esnext includes all current and proposed ECMAScript features.

Resources

Screenshots

Related issue

Other

This PR tweaks the base TypeScript config to allow for better module resolution and better support for modern JavaScript features. Specifically, it removes extraneous lib targets. `dom`, `dom.iterable`, and `esnext` are sufficient. `es2018`, `es2020`, `es2021`, and `es2022` are cumulative - each one includes all the previous ones. `esnext` includes all current and proposed ECMAScript features.
Copy link
Contributor

Size Change: 0 B

Total Size: 373 kB

ℹ️ View Unchanged
Filename Size
packages/esm-home-app/dist/132.js 175 B
packages/esm-home-app/dist/173.js 135 B
packages/esm-home-app/dist/197.js 135 B
packages/esm-home-app/dist/271.js 725 B
packages/esm-home-app/dist/300.js 135 B
packages/esm-home-app/dist/335.js 144 B
packages/esm-home-app/dist/367.js 317 kB
packages/esm-home-app/dist/41.js 2.62 kB
packages/esm-home-app/dist/438.js 1.49 kB
packages/esm-home-app/dist/442.js 135 B
packages/esm-home-app/dist/55.js 135 B
packages/esm-home-app/dist/652.js 138 B
packages/esm-home-app/dist/661.js 138 B
packages/esm-home-app/dist/783.js 7.87 kB
packages/esm-home-app/dist/879.js 138 B
packages/esm-home-app/dist/903.js 5.73 kB
packages/esm-home-app/dist/913.js 22.1 kB
packages/esm-home-app/dist/99.js 134 B
packages/esm-home-app/dist/main.js 10.3 kB
packages/esm-home-app/dist/openmrs-esm-home-app.js 3.31 kB

compressed-size-action

},
"resolveJsonModule": true,
"skipLibCheck": true,
"strictNullChecks": true,
"target": "esnext",
"target": "esnext"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we change the target to be more conservative (maybe es2022?), as older browsers do not support bleeding edge features?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ts-config is actually pretty irrelevant. We just use ts for type-checking. This is what the bundler uses for the actual output.

Copy link

@chibongho chibongho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, looks good then.

@brandones brandones merged commit 29a6b36 into main Nov 22, 2024
5 checks passed
@brandones brandones deleted the chore/tweak-tsconfig-lib-targets branch November 22, 2024 23:51
denniskigen added a commit that referenced this pull request Nov 28, 2024
This commit cuts a new patch release of the Home app, v5.5.1, with the following changes:

* (fix) Wrap page header in t function by @NethmiRodrigo in #226
* (chore) Update translations from Transifex by @github-actions in #219
* (chore) Bump webpack from 5.93.0 to 5.94.0 by @dependabot in #220
* (chore) Bump express from 4.19.2 to 4.21.0 by @dependabot in #221
* (chore) Bump rollup from 2.77.2 to 2.79.2 by @dependabot in #223
* (chore) Update translations from Transifex by @github-actions in #224
* (chore) Bump http-proxy-middleware from 2.0.6 to 2.0.7 by @dependabot in #225
* (chore) Tweak tsconfig lib targets by @denniskigen in #227
* (chore) Remove unused test wrapper helper by @denniskigen in #228
* (chore) Update translations from Transifex by @github-actions in #229
* (docs) O3-3525: Enhance README by @Twiineenock in #211
@denniskigen denniskigen mentioned this pull request Nov 28, 2024
3 tasks
NethmiRodrigo pushed a commit that referenced this pull request Dec 2, 2024
This commit cuts a new patch release of the Home app, v5.5.1, with the following changes:

* (fix) Wrap page header in t function by @NethmiRodrigo in #226
* (chore) Update translations from Transifex by @github-actions in #219
* (chore) Bump webpack from 5.93.0 to 5.94.0 by @dependabot in #220
* (chore) Bump express from 4.19.2 to 4.21.0 by @dependabot in #221
* (chore) Bump rollup from 2.77.2 to 2.79.2 by @dependabot in #223
* (chore) Update translations from Transifex by @github-actions in #224
* (chore) Bump http-proxy-middleware from 2.0.6 to 2.0.7 by @dependabot in #225
* (chore) Tweak tsconfig lib targets by @denniskigen in #227
* (chore) Remove unused test wrapper helper by @denniskigen in #228
* (chore) Update translations from Transifex by @github-actions in #229
* (docs) O3-3525: Enhance README by @Twiineenock in #211
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.

4 participants