-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #428 from christophercr/feature/fix-formatting
style(stark-all): re-format files with latest Prettier version. Include MD files in Prettier auto formatting.
- Loading branch information
Showing
23 changed files
with
578 additions
and
405 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,6 @@ dist/ | |
coverage/ | ||
reports/ | ||
node_modules/ | ||
CHANGELOG.md | ||
package.json | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# Contributor Code of Conduct | ||
|
||
As contributors and maintainers of the Stark, we pledge to respect everyone who contributes by posting issues, updating documentation, submitting pull requests, providing feedback in comments, and any other activities. | ||
|
||
Communication through any of Stark's channels (GitHub, Twitter ,Slack, etc.) must be constructive and never resort to personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct. | ||
|
@@ -7,4 +8,4 @@ We promise to extend courtesy and respect to everyone involved in this project r | |
|
||
If any member of the community violates this code of conduct, the maintainers of the Stark project may take action, removing issues, comments, and PRs or blocking accounts as deemed appropriate. | ||
|
||
If you are subject to or witness unacceptable behavior, or have any other concerns, please email us at [[email protected]](mailto:[email protected]). | ||
If you are subject to or witness unacceptable behavior, or have any other concerns, please email us at [[email protected]](mailto:[email protected]). |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Stark Snapshots | ||
|
||
Daily snapshot builds are created and published by a Travis cron job. | ||
This was introduced via [this issue](https://github.com/NationalBankBelgium/stark/issues/27). | ||
|
||
For details, refer to `.travis.yml` and `release-publish.sh` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,18 +4,24 @@ During the development we are often in front of some errors and sometimes we do | |
That's why referenced those common errors here for sharing our solutions. | ||
|
||
> Table of contents | ||
* [NGC](#ngcErrors) | ||
* [TypeError: Cannot read property 'module' of undefined](#ngcErrorModuleUndefined) | ||
* [TypeError: Cannot read property 'kind' of undefined](#ngcErrorKindUndefined) | ||
* [Rollup](#rollupErrors) | ||
* [(!) Unresolved dependencies detected](#rollupErrorUnresolvedDeps) | ||
|
||
- [NGC](#ngcErrors) | ||
- [TypeError: Cannot read property 'module' of undefined](#ngcErrorModuleUndefined) | ||
- [TypeError: Cannot read property 'kind' of undefined](#ngcErrorKindUndefined) | ||
- [Rollup](#rollupErrors) | ||
|
||
- [(!) Unresolved dependencies detected](#rollupErrorUnresolvedDeps) | ||
|
||
## <a id="ngcErrors"></a>NGC errors | ||
#### <a id="ngcErrorModuleUndefined"></a>TypeError: Cannot read property 'module' of undefined | ||
|
||
#### <a id="ngcErrorModuleUndefined"></a>TypeError: Cannot read property 'module' of undefined | ||
|
||
In the cases we already saw, it was linked to an unexisting export in TypeScript. | ||
|
||
```typescript | ||
export * from "invalid path"; | ||
export * from "invalid path"; | ||
``` | ||
|
||
```bash | ||
> ngc | ||
|
||
|
@@ -37,35 +43,38 @@ npm ERR! @nationalbankbelgium/[email protected] ngc: `ngc` | |
npm ERR! Exit status 2 | ||
``` | ||
|
||
#### <a id="ngcErrorKindUndefined"></a>TypeError: Cannot read property 'kind' of undefined | ||
#### <a id="ngcErrorKindUndefined"></a>TypeError: Cannot read property 'kind' of undefined | ||
|
||
In the cases we already saw, it was linked to the class-validator decorator 'ValidateIf'. | ||
|
||
Our mistake was we declared a function inside the decorate which triggered an error in NGC. | ||
|
||
```typescript | ||
// The following code is not working | ||
export class StarkApplicationConfigImpl implements StarkApplicationConfig { | ||
@ValidateIf((appConfig: StarkApplicationConfig) => appConfig.loggingFlushDisabled !== true) | ||
@IsDefined() | ||
@IsString() | ||
@autoserialize | ||
public loggingFlushApplicationId?: string; | ||
@ValidateIf((appConfig: StarkApplicationConfig) => appConfig.loggingFlushDisabled !== true) | ||
@IsDefined() | ||
@IsString() | ||
@autoserialize | ||
public loggingFlushApplicationId?: string; | ||
} | ||
|
||
// The following code is working | ||
export class StarkApplicationConfigImpl implements StarkApplicationConfig { | ||
@ValidateIf(StarkApplicationConfigImpl.validateIfLoggingFlushEnabled) | ||
@IsDefined() | ||
@IsString() | ||
@autoserialize | ||
public loggingFlushApplicationId?: string; | ||
// ... | ||
public static validateIfLoggingFlushEnabled(instance: StarkApplicationConfig): boolean { | ||
return instance.loggingFlushDisabled !== true; | ||
} | ||
@ValidateIf(StarkApplicationConfigImpl.validateIfLoggingFlushEnabled) | ||
@IsDefined() | ||
@IsString() | ||
@autoserialize | ||
public loggingFlushApplicationId?: string; | ||
|
||
// ... | ||
|
||
public static validateIfLoggingFlushEnabled(instance: StarkApplicationConfig): boolean { | ||
return instance.loggingFlushDisabled !== true; | ||
} | ||
} | ||
``` | ||
|
||
```bash | ||
> ngc | ||
|
||
|
@@ -99,11 +108,11 @@ You can simply add the missing dependencies as following: | |
// ... | ||
|
||
const globals = { | ||
// ... | ||
"rxjs/observable/timer": "rxjs.observable.timer", | ||
"rxjs/observable/throw": "rxjs.observable.throw" | ||
// ... | ||
} | ||
// ... | ||
"rxjs/observable/timer": "rxjs.observable.timer", | ||
"rxjs/observable/throw": "rxjs.observable.throw" | ||
// ... | ||
}; | ||
``` | ||
|
||
Please ignore tslib unresolved dependency. | ||
|
Oops, something went wrong.