Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
fulls1z3 committed Jul 8, 2021
1 parent 6329569 commit f034e0f
Show file tree
Hide file tree
Showing 23 changed files with 3,282 additions and 2,258 deletions.
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install lint-staged
42 changes: 0 additions & 42 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,46 +1,4 @@
# Add files here to ignore them from prettier formatting

# compiled output
/dist
/docs
/tmp
/out-tsc

# dependencies
/node_modules

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
test-report.xml
/typings

# System Files
.DS_Store
Thumbs.db

# others
/tools
angular.json
yarn.lock
20 changes: 18 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
{
"printWidth": 140,
"singleQuote": true
"printWidth": 120,
"singleQuote": true,
"trailingComma": "none",
"arrowParens": "avoid",
"overrides": [
{
"files": "*.component.html",
"options": {
"parser": "angular"
}
},
{
"files": "*.html",
"options": {
"parser": "html"
}
}
]
}
52 changes: 24 additions & 28 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,38 +116,41 @@ After your pull request is merged, you can safely delete your branch and pull th
To ensure consistency throughout the source code, keep these rules in mind as you are working:
* All features or bug fixes **must be tested** by one or more specs (unit-tests).
* All public API methods **must be documented**. (Details TBC).
* We follow [fulls1z3's Angular TSLint rules][angular-tslint-rules].
- We follow [eslint:recommended][eslint].
## <a name="commit"></a> Commit message guidelines
We have very precise rules over how our git commit messages can be formatted. This leads to **more readable messages** that
are easy to follow when looking through the **project history**. But also, we use the git commit messages to **generate
the `ngx-meta` change log**.
### Commit Message Format
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes
a **type**, a **scope** (*when applicable*) and a **subject**:
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes
a **type** and a **subject**:
```
<type>(<scope>): <subject>
<type>: <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```
The **header** is mandatory and the **scope** of the header is optional.
The **header** is mandatory.
Any line of the commit message cannot be longer 100 characters. This allows the message to be easier to read on GitHub as
well as in various git tools.
Footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/)
if any.
Samples: (even more [samples](https://github.com/fulls1z3/ngx-meta/commits/master))
Samples: (even more [samples](https://github.com/fulls1z3/universal/commits/master))
```
docs(changelog): update change log to alpha.4
docs: update change log to alpha.4
```
```
fix(release): need to depend on latest rxjs and zone.js
fix: need to depend on latest rxjs and zone.js
The version in our package.json gets copied to the one we publish, and users need the latest of these.
```
Expand All @@ -157,27 +160,20 @@ If the commit reverts a previous commit, it should begin with `revert: `, follow
In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
### Type
Must be one of the following:
* **build**: Changes that affect the build system or external dependencies (example scopes: gulp, npm, webpack)
* **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, etc)
* **docs**: Documentation only changes
* **feat**: A new feature
* **fix**: A bug fix
* **perf**: A code change that improves performance
* **refactor**: A code change that neither fixes a bug nor adds a feature
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
* **test**: Adding missing tests or correcting existing tests
### Scope
The scope should be the name of the project affected.

The following is the list of supported scopes:
* **core**

There are currently a few exceptions to the "use project name" rule:
Must be one of the following:
* **packaging**: used for changes that change the package layout (*e.g. package.json, bundles, path changes, etc.*)
* **changelog**: used for updating the release notes in CHANGELOG.md
- **feat**: A new feature
- **fix**: A bug fix
- **docs**: Documentation only changes
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- **refactor**: A code change that neither fixes a bug nor adds a feature
- **perf**: A code change that improves performance
- **test**: Adding missing tests or correcting existing tests
- **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
- **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
- **chore**: Other changes that don't modify src or test files
- **revert**: Reverts a previous commit

### Subject
The subject contains succinct description of the change:
Expand All @@ -198,4 +194,4 @@ message is then used for this.
[coc]: https://github.com/fulls1z3/ngx-meta/blob/master/CODE_OF_CONDUCT.md
[github]: https://github.com/fulls1z3/ngx-meta
[angular-tslint-rules]: https://github.com/fulls1z3/angular-tslint-rules
[eslint]: https://github.com/eslint/eslint
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Burak Tasci
Copyright (c) 2021 Burak Tasci

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ configuration.

### Examples

- [ng-seed/universal] and [fulls1z3/example-app] are officially maintained projects, showcasing common patterns and best
- [fulls1z3/universal] and [fulls1z3/example-app] are officially maintained projects, showcasing common patterns and best
practices for **`ngx-meta`**.

## Contributing
Expand All @@ -48,10 +48,10 @@ If you want to file a bug, contribute some code, or improve documentation, pleas

The MIT License (MIT)

Copyright (c) 2019 [Burak Tasci]
Copyright (c) 2021 [Burak Tasci]

[@ngx-translate/core]: https://github.com/ngx-translate/core
[ng-seed/universal]: https://github.com/ng-seed/universal
[fulls1z3/universal]: https://github.com/fulls1z3/universal
[fulls1z3/example-app]: https://github.com/fulls1z3/example-app
[jetbrains]: https://www.jetbrains.com/community/opensource
[webstorm]: https://www.jetbrains.com/webstorm
Expand Down
5 changes: 1 addition & 4 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'scope-enum': [2, 'always', ['core', 'package', 'npm', 'circle', 'lint', 'packaging', 'changelog']]
}
extends: ['@commitlint/config-conventional']
};
29 changes: 29 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module.exports = {
displayName: 'ngx-meta',
preset: 'jest-preset-angular',
setupFilesAfterEnv: ['<rootDir>/tools/test/jest.setup.ts'],
testResultsProcessor: './node_modules/jest-junit-reporter',
globals: {
'ts-jest': {
tsConfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
astTransformers: {
before: ['jest-preset-angular/build/InlineFilesTransformer', 'jest-preset-angular/build/StripStylesTransformer']
}
}
},
moduleNameMapper: {
'^@ngx-meta/core': '<rootDir>/packages/@ngx-meta/core/src/index.ts'
},
cache: false,
silent: true,
collectCoverage: true,
collectCoverageFrom: [
"packages/@ngx-meta/core/src/**.ts"
],
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js'
]
};
80 changes: 26 additions & 54 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,74 +27,46 @@
"ci:after": "greenkeeper-lockfile-upload",
"test": "jest --runInBand --colors",
"test:ci": "jest --ci --updateSnapshot --colors",
"release": "standard-version"
"release": "standard-version",
"prepare": "husky install"
},
"devDependencies": {
"@angular/common": "^9.1.0",
"@angular/compiler": "^9.1.0",
"@angular/compiler-cli": "^9.1.0",
"@angular/core": "^9.1.0",
"@angular/platform-browser": "^9.1.0",
"@angular/platform-browser-dynamic": "^9.1.0",
"@angular/router": "^9.1.0",
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
"@types/jest": "^23.3.14",
"@types/lodash": "^4.14.150",
"@types/node": "^10.0.0",
"@angular/common": "^10.1.0",
"@angular/compiler": "^10.1.0",
"@angular/compiler-cli": "^10.1.0",
"@angular/core": "^10.1.0",
"@angular/platform-browser": "^10.1.0",
"@angular/platform-browser-dynamic": "^10.1.0",
"@angular/router": "^10.1.0",
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@types/jest": "26.0.8",
"@types/lodash": "^4.14.171",
"@types/node": "~8.9.4",
"angular-tslint-rules": "^1.20.4",
"codelyzer": "^5.2.2",
"cz-conventional-changelog": "^3.1.0",
"husky": "^4.2.0",
"jest": "^23.6.0",
"cz-conventional-changelog": "^3.3.0",
"husky": "^7.0.1",
"jest": "26.2.2",
"jest-junit-reporter": "^1.1.0",
"jest-preset-angular": "8.1.2",
"jest-preset-angular": "8.3.1",
"lerna": "^3.20.2",
"lint-staged": "^10.0.0",
"lodash": "^4.17.15",
"ng-packagr": "^9.0.0",
"prettier": "1.19.1",
"lint-staged": "~11.0.0",
"lodash": "^4.17.21",
"ng-packagr": "^10.1.2",
"prettier": "2.3.2",
"prettier-tslint": "^0.4.2",
"reflect-metadata": "^0.1.13",
"request": "^2.88.2",
"rimraf": "^3.0.2",
"rxjs": "~6.5.4",
"ts-node": "^8.9.0",
"tsickle": "^0.38.0",
"rxjs": "~6.5.5",
"ts-node": "^8.10.2",
"tsickle": "^0.43.0",
"tslint": "^5.20.1",
"tslint-config-prettier": "^1.18.0",
"typescript": "~3.8.3",
"typescript": "~4.0.8",
"zone.js": "^0.10.2"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"jest": {
"preset": "jest-preset-angular",
"setupTestFrameworkScriptFile": "./tools/test/jest.setup.ts",
"testResultsProcessor": "./node_modules/jest-junit-reporter",
"testMatch": [
"**/+(*.)+(spec|test).+(ts|js)?(x)"
],
"globals": {
"ts-jest": {
"tsConfigFile": "./tsconfig.json"
},
"__TRANSFORM_HTML__": true
},
"moduleNameMapper": {
"^@ngx-meta/core": "<rootDir>/packages/@ngx-meta/core/src/index.ts"
},
"cache": false,
"silent": true,
"collectCoverage": true,
"collectCoverageFrom": [
"packages/@ngx-meta/core/src/**.ts"
]
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
Expand Down
8 changes: 4 additions & 4 deletions packages/@ngx-meta/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ npm install @ngx-meta/core --save

### <a name="examples"></a> Examples

- [ng-seed/universal] and [fulls1z3/example-app] are officially maintained projects, showcasing common patterns and best
- [fulls1z3/universal] and [fulls1z3/example-app] are officially maintained projects, showcasing common patterns and best
practices for **`@ngx-meta/core`**.

### <a name="recommended-packages"></a> Recommended packages
Expand Down Expand Up @@ -313,7 +313,7 @@ export const routes: Routes = [
];
```

You can find out in-depth examples about the use of **`callback`** function on [ng-seed/universal] and on [fulls1z3/example-app],
You can find out in-depth examples about the use of **`callback`** function on [fulls1z3/universal] and on [fulls1z3/example-app],
which are officially maintained seed projects showcasing common patterns and best practices.

## <a name="set-meta-tags-programmatically"></a> Set meta tags programmatically
Expand Down Expand Up @@ -351,10 +351,10 @@ export class ItemComponent implements OnInit, OnDestroy {

The MIT License (MIT)

Copyright (c) 2019 [Burak Tasci]
Copyright (c) 2021 [Burak Tasci]

[@ngx-translate/core]: https://github.com/ngx-translate/core
[ng-seed/universal]: https://github.com/ng-seed/universal
[fulls1z3/universal]: https://github.com/fulls1z3/universal
[fulls1z3/example-app]: https://github.com/fulls1z3/example-app
[@ngx-config/core]: https://github.com/fulls1z3/ngx-config/tree/master/packages/@ngx-config/core
[forroot]: https://angular.io/docs/ts/latest/guide/ngmodule.html#!#core-for-root
Expand Down
7 changes: 0 additions & 7 deletions packages/@ngx-meta/core/ng-package.json

This file was deleted.

Loading

0 comments on commit f034e0f

Please sign in to comment.