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: use only base tsconfig strict #1073

Merged
merged 2 commits into from
Sep 7, 2023
Merged

Conversation

relu91
Copy link
Member

@relu91 relu91 commented Sep 6, 2023

Fix #758. I had to add additional changes because the "strictFunctionTypes": false, in the root tsconfig was hiding some problems in HTTP binding and examples. Even though the changes in the HTTP binding are more "missing" features of the find-my-way type, I think we can go over it and consider the issue fixed.

@codecov
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

Patch coverage: 29.47% and project coverage change: -0.23% ⚠️

Comparison is base (ecddb7f) 75.20% compared to head (63ce302) 74.98%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1073      +/-   ##
==========================================
- Coverage   75.20%   74.98%   -0.23%     
==========================================
  Files          80       80              
  Lines       15472    15531      +59     
  Branches     1484     1489       +5     
==========================================
+ Hits        11636    11646      +10     
- Misses       3800     3849      +49     
  Partials       36       36              
Files Changed Coverage Δ
packages/binding-http/src/routes/event.ts 17.85% <0.00%> (-0.67%) ⬇️
...ckages/binding-http/src/routes/property-observe.ts 17.39% <0.00%> (-0.96%) ⬇️
packages/binding-http/src/routes/action.ts 54.71% <16.66%> (-2.71%) ⬇️
packages/binding-http/src/routes/properties.ts 60.22% <28.57%> (-3.19%) ⬇️
packages/binding-http/src/routes/property.ts 63.93% <28.57%> (-2.45%) ⬇️
...kages/binding-http/src/routes/thing-description.ts 46.48% <28.57%> (-1.00%) ⬇️
packages/binding-mbus/src/mbus-connection.ts 70.55% <39.39%> (-3.76%) ⬇️
packages/binding-mbus/src/mbus-client.ts 63.22% <66.66%> (+1.15%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@danielpeintner danielpeintner left a comment

Choose a reason for hiding this comment

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

LGTM.

While reviewing the PR I noticed differences in the tsconfig.json of some bindings.
In general the compilerOptions look like this.

  "compilerOptions": {
        "outDir": "dist",
        "rootDir": "src"
    }

Anyhow, there are some additions in some packages and I wonder whether we can align them

"typeRoots": ["./node_modules/@types", "./typings"]
... in binding-coap

"resolveJsonModule": true
... in cli, core, and td-tools

"target": "ES2018"
... in examples

"types": ["node", "readable-stream"]
... in td-tools

Do you think it is worthwhile investigating?

@relu91
Copy link
Member Author

relu91 commented Sep 7, 2023

Good points. Answering:
- binding-coap: It was a leftover of a workaround that we have for a bug in the typings of coap library. The commit above removes it.

  • "resolveJsonModule": true": it is needed because this package requires some kind of JSON file (it can be the JSON schema or the package.json)
  • "target": "ES2018" It is needed to have nice generated JS with await and async features.
  • "types": ["node", "readable-stream"] needed for webpack.

I'm merging now.

@relu91 relu91 merged commit 8bdbba0 into eclipse-thingweb:master Sep 7, 2023
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.

tsconfig.json too benevolent
3 participants