Skip to content

Commit c98c729

Browse files
author
Charlike Mike Reagent
authored
major(release): refactor (v3) (#64)
* major: complete refactor * fix: publish rc6 * fix: add docs * fix: prepare for master auto publish/release Signed-off-by: Charlike Mike Reagent <mameto2011@gmail.com>
1 parent da2c5f8 commit c98c729

31 files changed

+2990
-2211
lines changed

.all-contributorsrc

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
{
22
"projectName": "detect-next-version",
3-
"projectOwner": "tunnckoCore",
3+
"projectOwner": "tunnckoCoreLabs",
4+
"repoType": "github",
5+
"repoHost": "https://github.com",
46
"files": [
5-
"CONTRIBUTORS.md"
7+
"README.md"
68
],
7-
"imageSize": 150,
8-
"commit": true,
9+
"imageSize": 120,
10+
"commit": false,
11+
"contributorsPerLine": 6,
912
"contributors": [
1013
{
11-
"login": "olstenlarck",
14+
"login": "tunnckoCore",
1215
"name": "Charlike Mike Reagent",
1316
"avatar_url": "https://avatars3.githubusercontent.com/u/5038030?v=4",
14-
"profile": "https://i.am.charlike.online",
17+
"profile": "https://tunnckocore.com",
1518
"contributions": [
16-
"question",
1719
"code",
1820
"doc",
21+
"question",
1922
"review",
20-
"test"
23+
"fundingFinding"
2124
]
2225
}
2326
]

.circleci/config.yml

Lines changed: 122 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,149 @@
11
version: 2
22

3-
defaults: &defaults
3+
workdir: &workdir
44
working_directory: ~/detect-next-version
5+
6+
# node8osx: &node8osx
7+
# <<: *workdir
8+
# macos:
9+
# xcode: "9.2"
10+
11+
# node10osx: &node10osx
12+
# <<: *workdir
13+
# macos:
14+
# xcode: "9"
15+
16+
node8linux: &node8linux
17+
<<: *workdir
18+
docker:
19+
- image: circleci/node:8
20+
21+
node10linux: &node10linux
22+
<<: *workdir
523
docker:
6-
- image: circleci/node:8@sha256:cf63f9a9a1eed0a978072293a4a4e35a53f0a77655c64a0ad51ca332e138c82a
24+
- image: circleci/node:10
725

826
restore_modules_cache: &restore_modules_cache
927
restore_cache:
1028
keys:
11-
- detect-next-version-{{ checksum "yarn.lock" }}
12-
# fallback to using the latest cache if no exact match is found
13-
- detect-next-version-
29+
- detect-next-version-{{ checksum "yarn.lock" }}
30+
# fallback to using the latest cache if no exact match is found
31+
- detect-next-version-
32+
33+
# jobinstall: &jobinstall
34+
# steps:
35+
# - checkout
36+
# # - *restore_modules_cache
37+
# - run:
38+
# name: Installing PNPM package manager
39+
# command: sudo npm i -g pnpm
40+
# - run:
41+
# name: Installing project dependencies
42+
# command: pnpm run inst
43+
# - save_cache:
44+
# key: detect-next-version-{{ checksum "yarn.lock" }}
45+
# paths: node_modules
46+
# - run:
47+
# name: Remove node_modules to cleanup workspace
48+
# command: rm -rf node_modules
1449

50+
jobtest: &jobtest
51+
steps:
52+
- checkout
53+
- *restore_modules_cache
54+
- run:
55+
name: Installing project dependencies
56+
command: yarn install --prefer-offline || yarn install
57+
- run:
58+
name: Testing your project
59+
command: yarn tunnckocore-scripts test
60+
- save_cache:
61+
key: detect-next-version-{{ checksum "yarn.lock" }}
62+
paths: node_modules
63+
- run:
64+
name: Sending test coverage to CodeCov
65+
command: bash <(curl -s https://codecov.io/bash)
1566

1667
jobs:
17-
install:
18-
<<: *defaults
19-
steps:
20-
- checkout
21-
- *restore_modules_cache
22-
- run:
23-
name: Installing Dependencies
24-
command: yarn install
25-
- save_cache:
26-
key: detect-next-version-{{ checksum "yarn.lock" }}
27-
paths: node_modules
28-
- run:
29-
name: Remove node_modules to cleanup workspace
30-
command: rm -rf node_modules
68+
# install-node8linux:
69+
# <<: *node8linux
70+
# <<: *jobinstall
3171

32-
test:
33-
<<: *defaults
34-
steps:
35-
- checkout
36-
- *restore_modules_cache
37-
- run:
38-
name: Running tests and checks
39-
command: yarn test
40-
- run:
41-
name: Sending test coverage to CodeCov
42-
command: bash <(curl -s https://codecov.io/bash)
72+
test-node8linux:
73+
<<: *node8linux
74+
<<: *jobtest
4375

44-
build:
45-
<<: *defaults
76+
# install-node10linux:
77+
# <<: *node10linux
78+
# <<: *jobinstall
79+
80+
test-node10linux:
81+
<<: *node10linux
82+
<<: *jobtest
83+
84+
# install-node8osx:
85+
# <<: *node8osx
86+
# <<: *jobinstall
87+
88+
# test-node8osx:
89+
# <<: *node8osx
90+
# <<: *jobtest
91+
92+
# install-node10osx:
93+
# <<: *node10osx
94+
# <<: *jobinstall
95+
96+
# test-node10osx:
97+
# <<: *node10osx
98+
# <<: *jobtest
99+
100+
release:
101+
<<: *node10linux
46102
steps:
47103
- checkout
48104
- *restore_modules_cache
49105
- run:
50-
name: Creating distributable files
51-
command: echo ok
52-
- store_artifacts:
53-
path: dist
54-
destination: detect-next-version
55-
56-
publish:
57-
<<: *defaults
58-
steps:
59-
- checkout
60-
- *restore_modules_cache
106+
name: Bundling your awesome project
107+
command: yarn tunnckocore-scripts build || echo "No build step."
61108
- run:
62-
name: Trying to deploy
63-
command: yarn hela release
109+
name: Releasing and publishing
110+
command: yarn tunnckocore-scripts release
64111

65112
workflows:
66113
version: 2
67114
automated:
68115
jobs:
69-
- install
70-
- test:
71-
requires:
72-
- install
73-
- build:
74-
requires:
75-
- test
76-
filters:
77-
branches:
78-
only: master
79-
- publish:
116+
# Linux
117+
- test-node8linux
118+
- test-node10linux
119+
120+
# - install-node8linux
121+
# - test-node8linux:
122+
# requires:
123+
# - install-node8linux
124+
# - install-node10linux
125+
# - test-node10linux:
126+
# requires:
127+
# - install-node10linux
128+
# OSX
129+
# - install-node8osx
130+
# - test-node8osx:
131+
# requires:
132+
# - install-node8osx
133+
# - install-node10osx
134+
# - test-node10osx:
135+
# requires:
136+
# - install-node10osx
137+
138+
# Release and NPM publish
139+
# Executed only on master
140+
- release:
80141
requires:
81-
- build
142+
# - test-node8osx
143+
# - test-node10osx
144+
- test-node8linux
145+
- test-node10linux
82146
filters:
83147
branches:
84148
only: master
85-
context: org-global
149+
context: org-secret

.editorconfig

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
# http://editorconfig.org/
12
root = true
23

3-
[*]
4+
[*.{js,mjs,jsx,ts,tsx}]
45
indent_style = space
56
indent_size = 2
67
charset = utf-8
78
trim_trailing_whitespace = true
89
insert_final_newline = true
910

1011
[*.md]
11-
trim_trailing_whitespace = false
12+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,12 @@
1-
# Always-ignore dirs #
2-
# ####################
3-
_gh_pages
4-
node_modules
5-
jspm_packages
6-
bower_components
7-
vendor
8-
build
9-
dest
101
dist
11-
lib-cov
12-
coverage
13-
.nyc_output
14-
nyc_output
15-
nbproject
16-
cache
17-
temp
18-
tmp
2+
detect-next-version
193

20-
# npm >=5 lock file (& shrinkwrap), we use Yarn!
4+
# Lockfiles. We use Yarn (https://yarnpkg.com/)
215
package-lock.json
226
npm-shrinkwrap.json
7+
shrinkwrap.yaml
238

24-
# Typescript v1 declaration files
25-
typings/
26-
27-
# Packages #
9+
# Archives and packages #
2810
# ##########
2911
*.7z
3012
*.dmg
@@ -47,47 +29,64 @@ logs
4729
*.sqlite
4830
*~
4931
~*
32+
.DS_Store*
33+
34+
# dotenv environment variables file
35+
.env
36+
.pem
37+
*.pem
5038

5139
# Runtime data
5240
pids
5341
*.pid
5442
*.seed
5543
*.pid.lock
5644

57-
# Editors
58-
*.idea
45+
# Directory for instrumented libs generated by jscoverage/JSCover
46+
lib-cov
5947

60-
# Another files #
61-
# ###############
62-
Icon?
63-
.DS_Store*
64-
Thumbs.db
65-
ehthumbs.db
66-
Desktop.ini
67-
.directory
68-
._*
69-
lcov.info
48+
# Coverage directory used by tools like istanbul
49+
coverage
7050

71-
# Runtime data
72-
pids
73-
*.pid
74-
*.seed
75-
*.pid.lock
51+
# nyc test coverage
52+
.nyc_output
53+
54+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
55+
.grunt
56+
57+
# Bower dependency directory (https://bower.io/)
58+
bower_components
59+
60+
# node-waf configuration
61+
.lock-wscript
62+
63+
# Compiled binary addons (https://nodejs.org/api/addons.html)
64+
build/Release
65+
66+
# Dependency directories
67+
node_modules/
68+
jspm_packages/
69+
70+
# TypeScript v1 declaration files
71+
typings/
7672

7773
# Optional npm cache directory
7874
.npm
7975

76+
# Optional eslint cache
77+
.eslintcache
78+
8079
# Optional REPL history
8180
.node_repl_history
8281

83-
# Optional eslint cache
84-
.eslintcache
82+
# Output of 'npm pack'
83+
*.tgz
8584

8685
# Yarn Integrity file
8786
.yarn-integrity
8887

89-
# The `@std/esm` package cache
90-
.esm-cache
91-
9288
# dotenv environment variables file
9389
.env
90+
91+
# next.js build output
92+
.next

.eslintrc

Lines changed: 0 additions & 5 deletions
This file was deleted.

.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
'use strict';
2+
3+
module.exports = require('@tunnckocore/config/eslint');

0 commit comments

Comments
 (0)