Skip to content

Commit 13dfa76

Browse files
@jotadevelopersergiohgz
authored andcommitted
feat(commons-api): add commons-api package
- feat: add error handler modules - chore(release): 0.1.0 - fix: remove unecessary shallow copy - chore(release): 0.1.1 - build: build before publish add lodash to check error issue - chore(release): 0.1.2
1 parent 8be1f76 commit 13dfa76

File tree

19 files changed

+7935
-0
lines changed

19 files changed

+7935
-0
lines changed

core/commons-api/.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": [["@verdaccio", {"typescript": true}]]
3+
}
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
version: 2
2+
3+
aliases:
4+
- &defaults
5+
working_directory: ~/commons
6+
- &node12_executor
7+
docker:
8+
- image: circleci/node:12
9+
- &node8_executor
10+
docker:
11+
- image: circleci/node:8
12+
- &node10_executor
13+
docker:
14+
- image: circleci/node:10
15+
- &default_executor
16+
<<: *node10_executor
17+
- &repo_key repo-{{ .Branch }}-{{ .Revision }}
18+
- &coverage_key coverage-{{ .Branch }}-{{ .Revision }}
19+
- &base_config_key base-config-{{ .Branch }}-{{ .Revision }}
20+
- &yarn_cache_key yarn-sha-{{ checksum "yarn.lock" }}
21+
- &restore_repo
22+
restore_cache:
23+
keys:
24+
- *repo_key
25+
- &ignore_non_dev_branches
26+
filters:
27+
tags:
28+
only: /.*/
29+
branches:
30+
ignore:
31+
- /release\/.*/
32+
- &execute_on_release
33+
filters:
34+
tags:
35+
only: /(v)?[0-9]+(\.[0-9]+)*/
36+
branches:
37+
ignore:
38+
- /.*/
39+
40+
jobs:
41+
prepare:
42+
<<: *defaults
43+
<<: *default_executor
44+
steps:
45+
- *restore_repo
46+
- checkout
47+
- restore_cache:
48+
key: *base_config_key
49+
- run:
50+
name: 'Base environment setup'
51+
command: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
52+
- save_cache:
53+
key: *base_config_key
54+
paths:
55+
- ~/.npmrc
56+
- ~/.gitconfig
57+
- restore_cache:
58+
key: *yarn_cache_key
59+
- run:
60+
name: Install Js dependencies
61+
command: yarn install --no-progress
62+
- save_cache:
63+
key: *yarn_cache_key
64+
paths:
65+
- ~/.yarn
66+
- ~/.cache/yarn
67+
- node_modules
68+
- save_cache:
69+
key: *repo_key
70+
paths:
71+
- ~/commons
72+
73+
check_lint:
74+
<<: *defaults
75+
<<: *default_executor
76+
steps:
77+
- *restore_repo
78+
- run:
79+
name: Check defined rules
80+
command: yarn lint
81+
82+
test_node12:
83+
<<: *defaults
84+
<<: *node12_executor
85+
steps:
86+
- *restore_repo
87+
- run:
88+
name: Test with Node 12
89+
command: yarn test
90+
91+
test_node8:
92+
<<: *defaults
93+
<<: *node8_executor
94+
steps:
95+
- *restore_repo
96+
- run:
97+
name: Test with Node 8
98+
command: yarn test
99+
100+
test_node10:
101+
<<: *defaults
102+
<<: *node10_executor
103+
steps:
104+
- *restore_repo
105+
- run:
106+
name: Test with Node 10
107+
command: yarn test
108+
109+
publish_package:
110+
<<: *defaults
111+
<<: *default_executor
112+
steps:
113+
- *restore_repo
114+
- restore_cache:
115+
key: *base_config_key
116+
- run:
117+
name: Publish
118+
command: yarn publish
119+
120+
workflows:
121+
version: 2
122+
workflow:
123+
jobs:
124+
- prepare:
125+
<<: *ignore_non_dev_branches
126+
- check_lint:
127+
requires:
128+
- prepare
129+
<<: *ignore_non_dev_branches
130+
- test_node12:
131+
requires:
132+
- prepare
133+
<<: *ignore_non_dev_branches
134+
- test_node8:
135+
requires:
136+
- prepare
137+
<<: *ignore_non_dev_branches
138+
- test_node10:
139+
requires:
140+
- prepare
141+
<<: *ignore_non_dev_branches
142+
- publish_package:
143+
requires:
144+
- check_lint
145+
- test_node12
146+
- test_node8
147+
- test_node10
148+
<<: *execute_on_release

core/commons-api/.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# top-most EditorConfig file
2+
root = true
3+
4+
# Unix-style newlines with a newline ending every file
5+
[*]
6+
end_of_line = lf
7+
insert_final_newline = true
8+
9+
# 2 space indentation
10+
[{.,}*.{js,yml,yaml}]
11+
indent_style = space
12+
indent_size = 2

core/commons-api/.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
coverage/
3+
lib/
4+
.nyc_output
5+
tests-report/

core/commons-api/.eslintrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": [
3+
"@verdaccio"
4+
],
5+
"plugins": ["jest"],
6+
"rules": {
7+
"@typescript-eslint/no-use-before-define": 0
8+
},
9+
"env": {
10+
"jest/globals": true
11+
}
12+
}

core/commons-api/.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.DS_Store
2+
package-lock.json
3+
_storage/
4+
lib/
5+
node_modules/
6+
coverage/
7+
*.lock.*
8+
9+
# IDE
10+
.vscode/*
11+
.idea/
12+
*.log
13+
*.tar
14+
*.gz
15+
*.tmp-*
16+
coverage/

core/commons-api/.npmignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
src/
2+
tests-report/
3+
.nyc_output
4+
.editorconfig
5+
.gitignore
6+
yarn-error.log
7+
yarn.lock
8+
.eslintrc
9+
.babelrc
10+
test/
11+
.eslintignore
12+
.eslintrc.yml
13+
.npmignore
14+
.travis.yml
15+
coverage/
16+
types/
17+
.idea/
18+
.circleci/
19+
tsconfig.json
20+
jest.config.js
21+
.DS_Store
22+
.prettierrc
23+
*.spec.js

core/commons-api/.prettierrc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"useTabs": false,
5+
"printWidth": 800,
6+
"tabWidth": 2,
7+
"bracketSpacing": true,
8+
"overrides": [
9+
{
10+
"files": "*.test.js",
11+
"options": {
12+
"semi": true
13+
}
14+
}
15+
]
16+
}

core/commons-api/CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4+
5+
### [0.1.2](https://github.com/verdaccio/commons-api/compare/v0.1.1...v0.1.2) (2019-07-15)
6+
7+
8+
### Build System
9+
10+
* build before publish ([f3d952d](https://github.com/verdaccio/commons-api/commit/f3d952d))
11+
12+
13+
14+
### [0.1.1](https://github.com/verdaccio/commons-api/compare/v0.1.0...v0.1.1) (2019-07-12)
15+
16+
17+
### Bug Fixes
18+
19+
* remove unecessary shallow copy ([af7bc7c](https://github.com/verdaccio/commons-api/commit/af7bc7c))
20+
21+
22+
23+
## 0.1.0 (2019-06-25)
24+
25+
26+
### Features
27+
28+
* add error handler modules ([936212b](https://github.com/verdaccio/commons-api/commit/936212b))

core/commons-api/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2017 Verdaccio team
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)