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: improve package json typings #955

Merged
merged 1 commit into from
Sep 1, 2021

Conversation

lifeart
Copy link
Collaborator

@lifeart lifeart commented Aug 31, 2021

  • in addition, fixed keywords field for synthetic packages
  • AddonMeta properties merging

name: '@embroider/synthesized-vendor',
version: '0.0.0',
keywords: 'ember-addon',
keywords: ['ember-addon'],
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

here is fix

name: '@embroider/synthesized-styles',
version: '0.0.0',
keywords: 'ember-addon',
keywords: ['ember-addon'],
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

here is fix

| AddonMeta
| AppMeta
| {
main?: string;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not confident about v1 version structure here

@@ -288,7 +288,7 @@ export default class V1Addon {
// shallow copy only! This is OK as long as we're only changing top-level
// keys in this method
let pkg = Object.assign({}, this.packageJSON);
let meta: AddonMeta = Object.assign({}, pkg.meta, this.packageMeta);
let meta: AddonMeta = Object.assign({}, this.packageCache.get(this.root).meta, this.packageMeta);
Copy link
Collaborator Author

@lifeart lifeart Sep 1, 2021

Choose a reason for hiding this comment

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

fixed one more case here, looks like meta exists on Package class, not package.json payload

@lifeart lifeart marked this pull request as draft September 1, 2021 09:00
also fixed few error, finding by type-checking

improve addonInstance typings

fix more typing errors

fix more typings

suspend overload error here
@lifeart lifeart marked this pull request as ready for review September 1, 2021 10:24
@stefanpenner stefanpenner merged commit 25a883a into master Sep 1, 2021
@stefanpenner stefanpenner deleted the improve-package.json-typings branch September 1, 2021 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants