Skip to content

Commit 74db0b2

Browse files
0.0.13 release (#153)
* chore(release): prepare next release * npm: bump @actions/github from 3.0.0 to 4.0.0 Bumps [@actions/github](https://github.com/actions/toolkit/tree/HEAD/packages/github) from 3.0.0 to 4.0.0. - [Release notes](https://github.com/actions/toolkit/releases) - [Changelog](https://github.com/actions/toolkit/blob/master/packages/github/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/github) Signed-off-by: dependabot[bot] <support@github.com> * npm: bump @typescript-eslint/eslint-plugin from 3.4.0 to 3.5.0 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 3.4.0 to 3.5.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v3.5.0/packages/eslint-plugin) Signed-off-by: dependabot[bot] <support@github.com> * npm: bump @typescript-eslint/parser from 3.4.0 to 3.5.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 3.4.0 to 3.5.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v3.5.0/packages/parser) Signed-off-by: dependabot[bot] <support@github.com> * npm: bump typescript from 3.9.5 to 3.9.6 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.5 to 3.9.6. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/commits) Signed-off-by: dependabot[bot] <support@github.com> * npm: bump eslint from 7.3.1 to 7.4.0 Bumps [eslint](https://github.com/eslint/eslint) from 7.3.1 to 7.4.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md) - [Commits](eslint/eslint@v7.3.1...v7.4.0) Signed-off-by: dependabot[bot] <support@github.com> * npm: bump eslint-plugin-jest from 23.17.1 to 23.18.0 Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 23.17.1 to 23.18.0. - [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases) - [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/master/CHANGELOG.md) - [Commits](jest-community/eslint-plugin-jest@v23.17.1...v23.18.0) Signed-off-by: dependabot[bot] <support@github.com> * npm: bump @typescript-eslint/parser from 3.5.0 to 3.6.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 3.5.0 to 3.6.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v3.6.0/packages/parser) Signed-off-by: dependabot[bot] <support@github.com> * npm: bump @types/jest from 26.0.3 to 26.0.4 Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.3 to 26.0.4. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) Signed-off-by: dependabot[bot] <support@github.com> * npm: bump @typescript-eslint/eslint-plugin from 3.5.0 to 3.6.0 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 3.5.0 to 3.6.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v3.6.0/packages/eslint-plugin) Signed-off-by: dependabot[bot] <support@github.com> * npm: bump @typescript-eslint/eslint-plugin from 3.6.0 to 3.6.1 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 3.6.0 to 3.6.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v3.6.1/packages/eslint-plugin) Signed-off-by: dependabot[bot] <support@github.com> * npm: bump @typescript-eslint/parser from 3.6.0 to 3.6.1 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 3.6.0 to 3.6.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v3.6.1/packages/parser) Signed-off-by: dependabot[bot] <support@github.com> * npm: bump ts-jest from 26.1.1 to 26.1.3 Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 26.1.1 to 26.1.3. - [Release notes](https://github.com/kulshekhar/ts-jest/releases) - [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md) - [Commits](kulshekhar/ts-jest@v26.1.1...v26.1.3) Signed-off-by: dependabot[bot] <support@github.com> * npm: bump @octokit/rest from 18.0.0 to 18.0.1 Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 18.0.0 to 18.0.1. - [Release notes](https://github.com/octokit/rest.js/releases) - [Commits](octokit/rest.js@v18.0.0...v18.0.1) Signed-off-by: dependabot[bot] <support@github.com> * npm: bump typescript from 3.9.6 to 3.9.7 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.6 to 3.9.7. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](microsoft/TypeScript@v3.9.6...v3.9.7) Signed-off-by: dependabot[bot] <support@github.com> * npm: bump @types/jest from 26.0.4 to 26.0.5 Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.4 to 26.0.5. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) Signed-off-by: dependabot[bot] <support@github.com> * npm: bump eslint-plugin-unicorn from 20.1.0 to 21.0.0 Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 20.1.0 to 21.0.0. - [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases) - [Commits](sindresorhus/eslint-plugin-unicorn@v20.1.0...v21.0.0) Signed-off-by: dependabot[bot] <support@github.com> * npm: bump eslint from 7.4.0 to 7.5.0 Bumps [eslint](https://github.com/eslint/eslint) from 7.4.0 to 7.5.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md) - [Commits](eslint/eslint@v7.4.0...v7.5.0) Signed-off-by: dependabot[bot] <support@github.com> * chore(quality): add codacy and codeclimate * refactor(vscode): refactor vscode config * refactor(build): refactor GitHub CI * refactor(docs): refactor docs * refactor(test): move test utils * docs(SECURITY): update * refactor(eslint): fix complexity issue * chore(docs): update docs * chore(dependencies): update dependencie * chore(buildf): add build path * chore(release): 0.0.10 release * docs(changelog): update changelog * chore(dependencies): update dev dependencies * chore(dependencies): update dev dependencies * chore(dependencies): update dependnencies * chore(dependencies): update dev dependencies * chore(release): bump version * chore(CHANGELOG): update changelog * chore(release): bump version * chore(dependencies): update dependencies * chore(dist): update dist * chore(codequality): renamed variable * chore(codequality): renamed variable, find to some * chore(docs): update README * chore(docs): update SECURITY * chore(docs): update CHANGELOG * build(dependencies): ➕ introduces conventional commit Updates husky and lint-stage dependencies and introduces conventional commit. * chore(dependencies): ⬆️ updates jest dependencies * chore(dependencies): ⬆️ updates ncc dependency Replaces @zeit/ncc with @vercel/ncc. * build(dependencies): ➖ removes jest typing * chore(dependencies): ⬆️ updates eslint dependencies Updates eslint related configurations * build(dependencies): ➖ removes ts-code dependency * chore(dependencies): ⬆️ updates typescript dependency * chore(dependencies): ⬆️ updates @actions/core dependency * refactor: 🔨 refactors build scripts * fix(action): 🐛 fixes action Adds type to error * docs(docs): 📝 updates documentation * ci(workflows): 👷 updates GitHub workflows * build(action): ⬆️ uses node16 for action * build(action): 🚨 configure method complexity for codeclimate * docs(docs): 📝 updates codeclimate related documentation * build(vscode): ➕ adds vscode extensions Removes brackets extension * chore(action): 📦 updates action package * ci(workflows): 🐛 fixes GitHub workflows * chore(dependencies): ⬆️ updates @octokit/rest dependency * chore: 🔖 bumps version * chore(dependencies): ⬆️ updates @actions/github dependency * docs: 📝 updates changelog * build: 🧑‍💻 adds pre-push hook Runs checks on push. * build: 🐛 fix codeclimate check to run as pre commit hook Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent cb6182d commit 74db0b2

File tree

7 files changed

+145
-48
lines changed

7 files changed

+145
-48
lines changed

.husky/pre-push

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm run clear && npm install && lint-staged && npm test && npm run build && npm run codeclimate

CHANGELOG.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,100 @@
1+
#### 0.0.13 (2022-02-02)
2+
3+
##### Build System / Dependencies
4+
5+
* **vscode:** :heavy_plus_sign: adds vscode extensions ([6d5c575c](https://github.com/gregoranders/nodejs-create-release/commit/6d5c575cfbb8cba220a87919bf100e64c72979a7))
6+
* **action:**
7+
* :rotating_light: configure method complexity for codeclimate ([fe5ac745](https://github.com/gregoranders/nodejs-create-release/commit/fe5ac745ee9d875e8fa83e0c8cdd27ee6d84254e))
8+
* :arrow_up: uses node16 for action ([ad910d53](https://github.com/gregoranders/nodejs-create-release/commit/ad910d53ccdb57ea199fec0c7881488a7a005022))
9+
* **dependencies:**
10+
* :heavy_minus_sign: removes ts-code dependency ([f2fb642b](https://github.com/gregoranders/nodejs-create-release/commit/f2fb642bbb48445bc9ccd9e09560eddc1da38f4a))
11+
* :heavy_minus_sign: removes jest typing ([496335c3](https://github.com/gregoranders/nodejs-create-release/commit/496335c3b62a7f6eead7026931c0581997f30cfd))
12+
* :heavy_plus_sign: introduces conventional commit ([fe03773b](https://github.com/gregoranders/nodejs-create-release/commit/fe03773b790f870b07b88f312d5837c6eb657703))
13+
14+
##### Chores
15+
16+
* **dependencies:**
17+
* :arrow_up: updates @actions/github dependency ([004d502d](https://github.com/gregoranders/nodejs-create-release/commit/004d502ddf225d0b0a1c462928857ac7fb4db2f9))
18+
* :arrow_up: updates @octokit/rest dependency ([e7f46003](https://github.com/gregoranders/nodejs-create-release/commit/e7f46003493733aed6df0618be4af73cf62aaace))
19+
* :arrow_up: updates @actions/core dependency ([146e4c86](https://github.com/gregoranders/nodejs-create-release/commit/146e4c86851b64677e9a8bfe3e9dfc87accede99))
20+
* :arrow_up: updates typescript dependency ([1f64e2e4](https://github.com/gregoranders/nodejs-create-release/commit/1f64e2e4bcdc906b61db05fe7f6079b2e3dfad21))
21+
* :arrow_up: updates eslint dependencies ([50004546](https://github.com/gregoranders/nodejs-create-release/commit/500045461d33e3cf2d5ee736da35520ed1dc669d))
22+
* :arrow_up: updates ncc dependency ([e45750f0](https://github.com/gregoranders/nodejs-create-release/commit/e45750f07aad97e62f7274440d4d7a8e6ab75b23))
23+
* :arrow_up: updates jest dependencies ([ef1ec6d9](https://github.com/gregoranders/nodejs-create-release/commit/ef1ec6d9a921cd67077bf3fbd4328649948d1b12))
24+
* update dependencies ([381588b5](https://github.com/gregoranders/nodejs-create-release/commit/381588b5723ee1a804b49621011913dfff7fdd24))
25+
* update dev dependencies ([81b538b0](https://github.com/gregoranders/nodejs-create-release/commit/81b538b0cc114950bb283fd0e999d30b21c9758e))
26+
* update dependnencies ([2f48bf8f](https://github.com/gregoranders/nodejs-create-release/commit/2f48bf8fd64dbdb2ed56e1e663974e1eb75b3d3c))
27+
* update dev dependencies ([e008467f](https://github.com/gregoranders/nodejs-create-release/commit/e008467fc0d0a39a4ac11b16ec8670c2b91607d4))
28+
* update dev dependencies ([d13810b2](https://github.com/gregoranders/nodejs-create-release/commit/d13810b249de518d0ef2855db77e055f96778cc8))
29+
* update dependencie ([66e6eab0](https://github.com/gregoranders/nodejs-create-release/commit/66e6eab036e2d6c323a125c8fa23d6e9f50487dc))
30+
* **action:** :package: updates action package ([6c323b7a](https://github.com/gregoranders/nodejs-create-release/commit/6c323b7a51ea90f9c08632496d9013ae555567c5))
31+
* **docs:**
32+
* update CHANGELOG ([23756c4f](https://github.com/gregoranders/nodejs-create-release/commit/23756c4f3814f37cef886ba701c5bdb2755b41f0))
33+
* update SECURITY ([f37c2c77](https://github.com/gregoranders/nodejs-create-release/commit/f37c2c77c8e9165d5c0945bc0cce89bee518e98c))
34+
* update README ([6e4fc58f](https://github.com/gregoranders/nodejs-create-release/commit/6e4fc58f213315c9e631cb9bf6a662ede88d2c9b))
35+
* update docs ([458726cc](https://github.com/gregoranders/nodejs-create-release/commit/458726ccb668821a3d79bbdee88142f9d36d8e37))
36+
* **codequality:**
37+
* renamed variable, find to some ([5e9a2ed7](https://github.com/gregoranders/nodejs-create-release/commit/5e9a2ed7a118ff99762dde9748b92bffbbbb6ed8))
38+
* renamed variable ([f65d3c53](https://github.com/gregoranders/nodejs-create-release/commit/f65d3c533a337209b595bf749ffc25ecad073e8e))
39+
* **dist:** update dist ([50fea682](https://github.com/gregoranders/nodejs-create-release/commit/50fea682fea5664fa23880d173892f8e68831f73))
40+
* **release:**
41+
* bump version ([f4c9923f](https://github.com/gregoranders/nodejs-create-release/commit/f4c9923f1844098deff912f3beca500a8c082938))
42+
* bump version ([278f1c3a](https://github.com/gregoranders/nodejs-create-release/commit/278f1c3a23960580f5ad698005cd2ae81da4eff7))
43+
* 0.0.10 release ([856c0a6d](https://github.com/gregoranders/nodejs-create-release/commit/856c0a6d57be92bad60ac3431a15eaf9a6d1a986))
44+
* prepare next release ([646e1ea4](https://github.com/gregoranders/nodejs-create-release/commit/646e1ea4a578e586fd063dc314672baf12c72d39))
45+
* **CHANGELOG:** update changelog ([4eddb075](https://github.com/gregoranders/nodejs-create-release/commit/4eddb075ba2c79dfb918e0642391ec271a293729))
46+
* **buildf:** add build path ([1fcd0530](https://github.com/gregoranders/nodejs-create-release/commit/1fcd0530f51b13d5750b28228c58dc6e8ae3693f))
47+
* **quality:** add codacy and codeclimate ([cbb06ce5](https://github.com/gregoranders/nodejs-create-release/commit/cbb06ce54dc5054098608759f63d5b7498da1242))
48+
49+
##### Continuous Integration
50+
51+
* **workflows:**
52+
* :bug: fixes GitHub workflows ([2edba6cc](https://github.com/gregoranders/nodejs-create-release/commit/2edba6ccb527d1b226193549562bb06dda258687))
53+
* :construction_worker: updates GitHub workflows ([14838a52](https://github.com/gregoranders/nodejs-create-release/commit/14838a52d2f6f6290fe36430c541c233a6611ed4))
54+
55+
##### Documentation Changes
56+
57+
* **docs:**
58+
* :memo: updates codeclimate related documentation ([550e1b90](https://github.com/gregoranders/nodejs-create-release/commit/550e1b908431b296cc9a318306b7d5e602f3e1db))
59+
* :memo: updates documentation ([69b99fc4](https://github.com/gregoranders/nodejs-create-release/commit/69b99fc448c6d1f896be9ed5dc55dcf5161353e2))
60+
* **changelog:** update changelog ([48906eba](https://github.com/gregoranders/nodejs-create-release/commit/48906ebaffa774ccd0614a113c9c3338bfc2c676))
61+
* **SECURITY:** update ([bcf858d7](https://github.com/gregoranders/nodejs-create-release/commit/bcf858d74b7e3dd0907d819ec5ccfab7f9f346ee))
62+
63+
##### Bug Fixes
64+
65+
* **action:** :bug: fixes action ([b3193fb1](https://github.com/gregoranders/nodejs-create-release/commit/b3193fb1cd6d1ccbc47cf5c73927eff66c0eab09))
66+
67+
##### Other Changes
68+
69+
* bumps version ([ec180cc9](https://github.com/gregoranders/nodejs-create-release/commit/ec180cc92a0f0b271d3e06ec41320ce6f645452e))
70+
* refactors build scripts ([d1cabce3](https://github.com/gregoranders/nodejs-create-release/commit/d1cabce3f15559f6e31ba31461cedafea40d2ff3))
71+
* bump @types/jest from 26.0.4 to 26.0.5 ([a27dba73](https://github.com/gregoranders/nodejs-create-release/commit/a27dba739833287aa2a1d5b45416536402f9681a))
72+
* bump eslint from 7.4.0 to 7.5.0 ([f5064916](https://github.com/gregoranders/nodejs-create-release/commit/f5064916f659bc50ce893a23dae7f9f8f46e0a42))
73+
* bump eslint-plugin-unicorn from 20.1.0 to 21.0.0 ([793c0939](https://github.com/gregoranders/nodejs-create-release/commit/793c0939a2703eee19217006ffc3bfb525f14fa8))
74+
* bump @types/jest from 26.0.4 to 26.0.5 ([c3958e50](https://github.com/gregoranders/nodejs-create-release/commit/c3958e50d4ffdd4b0fec9139f1649efe1584ce5d))
75+
* bump typescript from 3.9.6 to 3.9.7 ([a0ab0755](https://github.com/gregoranders/nodejs-create-release/commit/a0ab0755aa3fca8986be9f3ecd7880c0861e1c1e))
76+
* bump @octokit/rest from 18.0.0 to 18.0.1 ([23ed6a22](https://github.com/gregoranders/nodejs-create-release/commit/23ed6a224bd1b4ce16ed7445d516df6a6e05521a))
77+
* bump ts-jest from 26.1.1 to 26.1.3 ([13bfa9b5](https://github.com/gregoranders/nodejs-create-release/commit/13bfa9b5e72fe28d21dbdd8889be66d220c0f78d))
78+
* bump @typescript-eslint/parser from 3.6.0 to 3.6.1 ([700b8d20](https://github.com/gregoranders/nodejs-create-release/commit/700b8d20eb6a9bee471b447de04d5e3bfbad4dc3))
79+
* bump @typescript-eslint/eslint-plugin from 3.6.0 to 3.6.1 ([09976354](https://github.com/gregoranders/nodejs-create-release/commit/09976354c0c430e34641c4e4fe214bd43d3a3938))
80+
* bump @typescript-eslint/eslint-plugin from 3.5.0 to 3.6.0 ([afa7f4bc](https://github.com/gregoranders/nodejs-create-release/commit/afa7f4bc217ad17d118a16d2ed4d95e27f7d4611))
81+
* bump @types/jest from 26.0.3 to 26.0.4 ([6674a38b](https://github.com/gregoranders/nodejs-create-release/commit/6674a38ba90261bc0b11447b1585537d0342da2d))
82+
* bump @typescript-eslint/parser from 3.5.0 to 3.6.0 ([444ce2f0](https://github.com/gregoranders/nodejs-create-release/commit/444ce2f01ec3238e87a8454c0df928bdfb92177f))
83+
* bump eslint-plugin-jest from 23.17.1 to 23.18.0 ([34084b34](https://github.com/gregoranders/nodejs-create-release/commit/34084b34d652ba460336c7c9068c9258a4d35172))
84+
* bump eslint from 7.3.1 to 7.4.0 ([69edaa32](https://github.com/gregoranders/nodejs-create-release/commit/69edaa322a5e4bef5f5d21b3d61b55e6c58304a0))
85+
* bump typescript from 3.9.5 to 3.9.6 ([8e982ee2](https://github.com/gregoranders/nodejs-create-release/commit/8e982ee2825f8d3c72b831a428f8d1656e939752))
86+
* bump @typescript-eslint/parser from 3.4.0 to 3.5.0 ([d2f95f02](https://github.com/gregoranders/nodejs-create-release/commit/d2f95f02c0bb2d8a8c622163a8c17c2a82c2c236))
87+
* bump @typescript-eslint/eslint-plugin from 3.4.0 to 3.5.0 ([6b26ed80](https://github.com/gregoranders/nodejs-create-release/commit/6b26ed8087fc2aa3674161784b8ef0d2f152fa72))
88+
* bump @actions/github from 3.0.0 to 4.0.0 ([5d9abbcf](https://github.com/gregoranders/nodejs-create-release/commit/5d9abbcf2e282f03f0961721540581af9dc68d65))
89+
90+
##### Refactors
91+
92+
* **eslint:** fix complexity issue ([95fc2723](https://github.com/gregoranders/nodejs-create-release/commit/95fc272364581ba0af97c89d453e1efcc2570b83))
93+
* **test:** move test utils ([dc4e46e8](https://github.com/gregoranders/nodejs-create-release/commit/dc4e46e84eec92b753e8119f358bde81624aed7b))
94+
* **docs:** refactor docs ([bd920694](https://github.com/gregoranders/nodejs-create-release/commit/bd9206948e2f30d5a3c8b9c6679b82b537b6af27))
95+
* **build:** refactor GitHub CI ([f0e6fc5a](https://github.com/gregoranders/nodejs-create-release/commit/f0e6fc5a3750ed7fc389ecaac7c7e01296fa23ef))
96+
* **vscode:** refactor vscode config ([10600590](https://github.com/gregoranders/nodejs-create-release/commit/10600590f1e5300b3bbc253545ef6b616ce31273))
97+
198
#### 0.0.12 (2020-12-29)
299

3100
##### Chores

dist/index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nodejs-create-release",
3-
"version": "0.0.12",
3+
"version": "0.0.13",
44
"description": "NodeJS Create Release",
55
"main": "./dist/index.js",
66
"scripts": {
@@ -13,7 +13,7 @@
1313
"test": "jest",
1414
"watch": "tsc -w --project ./",
1515
"prepare": "husky install",
16-
"codeclimate": "docker run --interactive --tty --rm --env CODECLIMATE_CODE=\"$PWD\" --volume \"$PWD\":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate analyze",
16+
"codeclimate": "docker run --interactive --rm --env CODECLIMATE_CODE=\"$PWD\" --volume \"$PWD\":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate analyze",
1717
"changelog": "changelog"
1818
},
1919
"repository": {
@@ -85,7 +85,7 @@
8585
"homepage": "https://gregoranders.github.io/nodejs-create-release/",
8686
"dependencies": {
8787
"@actions/core": "1.6.0",
88-
"@actions/github": "4.0.0"
88+
"@actions/github": "5.0.0"
8989
},
9090
"devDependencies": {
9191
"@commitlint/cli": "16.1.0",

src/action.spec.ts

Lines changed: 32 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,41 @@
1-
import {
2-
clearTestEnvironment,
3-
createReleaseMock,
4-
listReleasesMock,
5-
setInput,
6-
setOutputMock,
7-
} from './fixtures/test-utils';
1+
import * as testUtils from './fixtures/test-utils';
82

9-
import { run as testSubject } from './action';
3+
import * as action from './action';
104

115
describe('nodejs-create-release', () => {
126
beforeEach(() => {
13-
clearTestEnvironment();
7+
testUtils.clearTestEnvironment();
148
Reflect.deleteProperty(process.env, 'GITHUB_TOKEN');
159
});
1610

1711
it('should throw an Error if no tag was provided', async () => {
18-
return expect(testSubject()).rejects.toStrictEqual(new Error('Input required and not supplied: tag'));
12+
return expect(action.run()).rejects.toStrictEqual(new Error('Input required and not supplied: tag'));
1913
});
2014

2115
it('should contain core error when GITHUB_TOKEN is missing', async () => {
22-
setInput('tag', 'v0.0.1');
23-
return expect(testSubject()).resolves.toHaveCoreError(/Missing GITHUB_TOKEN/);
16+
testUtils.setInput('tag', 'v0.0.1');
17+
return expect(action.run()).resolves.toHaveCoreError(/Missing GITHUB_TOKEN/);
2418
});
2519

2620
it('should create a release when a valid tag and GITHUB_TOKEN are provided', async () => {
27-
setInput('tag', 'v0.0.1');
21+
testUtils.setInput('tag', 'v0.0.1');
2822
process.env.GITHUB_TOKEN = 'abcd';
29-
listReleasesMock.mockReturnValue({ data: [] });
30-
createReleaseMock.mockReturnValue({
23+
testUtils.listReleasesMock.mockReturnValue({ data: [] });
24+
testUtils.createReleaseMock.mockReturnValue({
3125
data: {
3226
id: 1,
3327
upload_url: 'upload_url',
3428
url: 'url',
3529
},
3630
});
37-
return testSubject().then(() => {
38-
expect(listReleasesMock).toHaveBeenNthCalledWith(1, {
31+
return action.run().then(() => {
32+
expect(testUtils.listReleasesMock).toHaveBeenNthCalledWith(1, {
3933
owner: 'owner',
4034
page: 0,
4135
per_page: 10,
4236
repo: 'repo',
4337
});
44-
expect(createReleaseMock).toHaveBeenNthCalledWith(1, {
38+
expect(testUtils.createReleaseMock).toHaveBeenNthCalledWith(1, {
4539
body: 'v0.0.1 Release',
4640
draft: false,
4741
name: 'v0.0.1 Release',
@@ -51,18 +45,18 @@ describe('nodejs-create-release', () => {
5145
tag_name: 'v0.0.1',
5246
target_commitish: 'master',
5347
});
54-
expect(setOutputMock).toHaveBeenCalledTimes(3);
55-
expect(setOutputMock).toHaveCoreOutput('id', '1');
56-
expect(setOutputMock).toHaveCoreOutput('url', 'url');
57-
expect(setOutputMock).toHaveCoreOutput('upload_url', 'upload_url');
48+
expect(testUtils.setOutputMock).toHaveBeenCalledTimes(3);
49+
expect(testUtils.setOutputMock).toHaveCoreOutput('id', '1');
50+
expect(testUtils.setOutputMock).toHaveCoreOutput('url', 'url');
51+
expect(testUtils.setOutputMock).toHaveCoreOutput('upload_url', 'upload_url');
5852
});
5953
});
6054

6155
it('should return a release when a valid tag and GITHUB_TOKEN are provided and the release already exists', async () => {
6256
expect.assertions(6);
63-
setInput('tag', 'v0.0.2');
57+
testUtils.setInput('tag', 'v0.0.2');
6458
process.env.GITHUB_TOKEN = 'abcd';
65-
listReleasesMock.mockReturnValue({
59+
testUtils.listReleasesMock.mockReturnValue({
6660
data: [
6761
{
6862
id: 2,
@@ -72,36 +66,36 @@ describe('nodejs-create-release', () => {
7266
},
7367
],
7468
});
75-
return testSubject().then(() => {
76-
expect(listReleasesMock).toHaveBeenNthCalledWith(1, {
69+
return action.run().then(() => {
70+
expect(testUtils.listReleasesMock).toHaveBeenNthCalledWith(1, {
7771
owner: 'owner',
7872
page: 0,
7973
per_page: 10,
8074
repo: 'repo',
8175
});
82-
expect(createReleaseMock).not.toHaveBeenCalled();
83-
expect(setOutputMock).toHaveBeenCalledTimes(3);
84-
expect(setOutputMock).toHaveCoreOutput('id', '2');
85-
expect(setOutputMock).toHaveCoreOutput('url', 'url2');
86-
expect(setOutputMock).toHaveCoreOutput('upload_url', 'upload_url2');
76+
expect(testUtils.createReleaseMock).not.toHaveBeenCalled();
77+
expect(testUtils.setOutputMock).toHaveBeenCalledTimes(3);
78+
expect(testUtils.setOutputMock).toHaveCoreOutput('id', '2');
79+
expect(testUtils.setOutputMock).toHaveCoreOutput('url', 'url2');
80+
expect(testUtils.setOutputMock).toHaveCoreOutput('upload_url', 'upload_url2');
8781
});
8882
});
8983

9084
it('should contain core error if creating a realease failed', async () => {
91-
setInput('tag', 'v0.0.1');
85+
testUtils.setInput('tag', 'v0.0.1');
9286
process.env.GITHUB_TOKEN = 'abcd';
93-
listReleasesMock.mockReturnValue({ data: [] });
87+
testUtils.listReleasesMock.mockReturnValue({ data: [] });
9488
// eslint-disable-next-line unicorn/no-useless-undefined
95-
createReleaseMock.mockReturnValue(undefined);
96-
return testSubject().then(() => {
97-
expect(listReleasesMock).toHaveBeenNthCalledWith(1, {
89+
testUtils.createReleaseMock.mockReturnValue(undefined);
90+
return action.run().then(() => {
91+
expect(testUtils.listReleasesMock).toHaveBeenNthCalledWith(1, {
9892
owner: 'owner',
9993
page: 0,
10094
per_page: 10,
10195
repo: 'repo',
10296
});
103-
expect(createReleaseMock).toHaveCoreError(/^Unable to create/);
104-
expect(setOutputMock).toHaveBeenCalledTimes(0);
97+
expect(testUtils.createReleaseMock).toHaveCoreError(/^Unable to create/);
98+
expect(testUtils.setOutputMock).toHaveBeenCalledTimes(0);
10599
});
106100
});
107101
});

src/action.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type GitHub = ReturnType<typeof getOctokit>;
99
type ReposCreateReleaseParameters = RestEndpointMethodTypes['repos']['createRelease']['parameters'];
1010

1111
const listReleases = async (client: GitHub, context_: Context) => {
12-
const response = await client.repos.listReleases({
12+
const response = await client.rest.repos.listReleases({
1313
owner: context_.repo.owner,
1414
page: 0,
1515
per_page: 10,
@@ -35,7 +35,7 @@ const findRelease = async (client: GitHub, context_: Context, tag: string) => {
3535

3636
const createRelease = async (client: GitHub, parameters: ReposCreateReleaseParameters) => {
3737
core.startGroup(`Creating ${parameters.tag_name} release`);
38-
const response = await client.repos.createRelease(parameters);
38+
const response = await client.rest.repos.createRelease(parameters);
3939
if (response) {
4040
core.info(`Release ${response.data.tag_name} created [id: ${response.data.id}]`);
4141
core.endGroup();

src/fixtures/test-utils.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ const githubMock = jest.mock('@actions/github', () => {
3838
return {
3939
getOctokit: jest.fn().mockImplementation(() => {
4040
return {
41-
repos: {
42-
createRelease: createReleaseMock,
43-
listReleases: listReleasesMock,
41+
rest: {
42+
repos: {
43+
createRelease: createReleaseMock,
44+
listReleases: listReleasesMock,
45+
},
4446
},
4547
};
4648
}),

0 commit comments

Comments
 (0)