Skip to content

chore: upgrade to [email protected] #4051

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

Merged
merged 4 commits into from
Nov 12, 2019
Merged

Conversation

raymondfeng
Copy link
Contributor

@raymondfeng raymondfeng commented Nov 5, 2019

Blocked by typescript-eslint/typescript-eslint#815 (fixed by b21c2ce)
Worked around microsoft/TypeScript#34761

Checklist

👉 Read and sign the CLA (Contributor License Agreement) 👈

  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

👉 Check out how to submit a PR 👈

@raymondfeng raymondfeng changed the title chore: upgrade to [email protected] [WIP] chore: upgrade to [email protected] Nov 5, 2019
@raymondfeng raymondfeng requested a review from bajtos November 6, 2019 00:53
@dhmlau
Copy link
Member

dhmlau commented Nov 6, 2019

@raymondfeng , any reasons that we are renaming the *.datasource.json to *.config.json?

@raymondfeng
Copy link
Contributor Author

any reasons that we are renaming the *.datasource.json to *.config.json?

It's a workaround/fix for microsoft/TypeScript#34761. Considering we have:

db.datasource.json
db.datasource.ts

TypeScript 3.7.x tries to emit db.datasource.d.ts for both files and complains about the conflict.

@raymondfeng raymondfeng marked this pull request as ready for review November 6, 2019 16:44
@raymondfeng raymondfeng changed the title [WIP] chore: upgrade to [email protected] chore: upgrade to [email protected] Nov 6, 2019
@marioestradarosa
Copy link
Contributor

@raymondfeng nice catch on that. I read the whole issue on typescript and now I understand better. LGTM !.

I see conflicts of course with current applications in that they will need to manually change the datasource.json to datasource.config correct?.

Just a question: Isn't it possible to just move it to its own config directory ie: config/myds.datasource.json and put all the files there ?

@bajtos
Copy link
Member

bajtos commented Nov 12, 2019

chore: refresh package-lock.json

Can we leave this change out of this pull request please and let RenovateBot do the job?

Copy link
Member

@bajtos bajtos left a comment

Choose a reason for hiding this comment

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

The git history is not as clean as I would like it to be. Other than that, the patch LGTM.

"rimraf": "^3.0.0",
"source-map-support": "^0.5.16",
"typescript": "~3.6.4",
"typescript": "~3.7.2",
Copy link
Member

Choose a reason for hiding this comment

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

I am surprised to see this change as part of the commit chore: refresh package-lock.json, I would expect it to be a part of chore: upgrade to TypeScript 3.7.2.

@jomarocas
Copy link

Good day

i update typescript only for test error

first error is

error TS5056: Cannot write file '/dist/datasources/emptor.datasource.d.ts' because it would be overwritten by multiple input files.
error TS5056: Cannot write file '/dist/datasources/reactions.datasource.d.ts' because it would be overwritten by multiple input files.

Second error later of rename from reactions.datasource.ts to reactions.datasource.d.ts

500 Error: The key 'datasources.reactions' is not bound to any value in context application
 at ReactionsApplication.getBinding (/node_modules/@loopback/context/src/context.ts:889:11)

how can solve this?

@dhmlau
Copy link
Member

dhmlau commented Dec 17, 2019

@jomarocas, the naming convention for the datasource has been changed. Your problem should be fixed by renaming the datasource json files *.datasource.json to *.datasource.config.json.

For details, please see #4173 (comment).

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.

6 participants