Skip to content

Commit 24a9f96

Browse files
authored
Merge pull request #99 from launchcodedev/app-config-core
Package Modularization
2 parents f7d806c + a41a0ce commit 24a9f96

File tree

273 files changed

+4837
-2465
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

273 files changed

+4837
-2465
lines changed

.dockerignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
**/*.tsbuildinfo
2+
**/dist/
3+
**/node_modules/
4+
5+
docs/
6+
7+
.git/
8+
.github/
9+
.gitignore
10+
.editorconfig
11+
.dockerignore
12+
Dockerfile

.github/workflows/docker-image.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: docker-image
2+
3+
on:
4+
push:
5+
branches: 'master'
6+
tags: '*'
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: docker/setup-buildx-action@v1
15+
16+
- uses: docker/login-action@v1
17+
with:
18+
registry: ghcr.io
19+
username: ${{ github.repository_owner }}
20+
password: ${{ secrets.CR_PAT }}
21+
22+
- uses: docker/build-push-action@v2
23+
if: github.ref == 'refs/heads/master'
24+
with:
25+
push: true
26+
tags: |
27+
ghcr.io/launchcodedev/app-config:latest
28+
29+
- uses: olegtarasov/[email protected]
30+
id: tagName
31+
32+
- uses: docker/build-push-action@v2
33+
if: contains(github.ref, 'refs/tags/')
34+
with:
35+
push: true
36+
tags: |
37+
ghcr.io/launchcodedev/app-config:${{ steps.tagName.outputs.tag }}

.github/workflows/main.yml

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,33 @@ jobs:
2020
- uses: actions/setup-node@v1
2121
with:
2222
node-version: ${{ matrix.node-version }}
23-
- id: yarn-cache-dir-path
24-
run: echo "::set-output name=dir::$(yarn cache dir)"
25-
- id: yarn-cache
26-
uses: actions/cache@v2
27-
with:
28-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
29-
key: ${{ runner.os }}-node-${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }}
30-
restore-keys: |
31-
${{ runner.os }}-node-${{ matrix.node-version }}-yarn-
32-
- run: yarn install --prefer-offline
23+
- uses: bahmutov/npm-install@v1
3324
- run: yarn build
3425
- run: yarn lint
3526
- run: yarn test --coverage
3627
env: { CI: 1 }
3728
- uses: codecov/codecov-action@v1
3829
with:
3930
token: ${{ secrets.CODECOV_TOKEN }}
40-
files: ./app-config/coverage/coverage-final.json,./app-config-inject/coverage/coverage-final.json,./app-config-webpack-plugin/coverage/coverage-final.json
31+
files: |
32+
./app-config-cli/coverage/coverage-final.json,
33+
./app-config-config/coverage/coverage-final.json,
34+
./app-config-core/coverage/coverage-final.json,
35+
./app-config-cypress/coverage/coverage-final.json,
36+
./app-config-default-extensions/coverage/coverage-final.json,
37+
./app-config-encryption/coverage/coverage-final.json,
38+
./app-config-generate/coverage/coverage-final.json,
39+
./app-config-git/coverage/coverage-final.json,
40+
./app-config-inject/coverage/coverage-final.json,
41+
./app-config-logging/coverage/coverage-final.json,
42+
./app-config-meta/coverage/coverage-final.json,
43+
./app-config-node/coverage/coverage-final.json,
44+
./app-config-schema/coverage/coverage-final.json,
45+
./app-config-settings/coverage/coverage-final.json,
46+
./app-config-utils/coverage/coverage-final.json,
47+
./app-config-v1-compat/coverage/coverage-final.json,
48+
./app-config-webpack-plugin/coverage/coverage-final.json,
49+
./app-config/coverage/coverage-final.json,
4150
fail_ci_if_error: true
4251
verbose: true
4352

@@ -60,16 +69,8 @@ jobs:
6069
- uses: actions/setup-node@v1
6170
with:
6271
node-version: ${{ matrix.node-version }}
63-
- id: yarn-cache-dir-path
64-
run: echo "::set-output name=dir::$(yarn cache dir)"
65-
- id: yarn-cache
66-
uses: actions/cache@v2
67-
with:
68-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
69-
key: ${{ runner.os }}-node-${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }}
70-
restore-keys: |
71-
${{ runner.os }}-node-${{ matrix.node-version }}-yarn-
72-
- run: yarn install --prefer-offline
72+
- uses: bahmutov/npm-install@v1
73+
7374
- run: yarn build
7475
- run: yarn test --testTimeout 20000
7576
env: { CI: 1 }
@@ -81,22 +82,16 @@ jobs:
8182
- uses: actions/setup-node@v1
8283
with:
8384
node-version: 14.x
84-
- id: yarn-cache-dir-path
85-
run: echo "::set-output name=dir::$(yarn cache dir)"
86-
- id: yarn-cache
87-
uses: actions/cache@v2
88-
with:
89-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
90-
key: ${{ runner.os }}-node-${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }}
91-
restore-keys: |
92-
${{ runner.os }}-node-${{ matrix.node-version }}-yarn-
93-
- run: yarn install --prefer-offline
85+
- uses: bahmutov/npm-install@v1
86+
9487
- run: yarn build
88+
9589
- name: Cypress dependencies
9690
uses: cypress-io/github-action@v2
9791
with:
9892
install: true
9993
runTests: false
94+
10095
- uses: cypress-io/github-action@v2
10196
with:
10297
group: frontend-example-project-test
@@ -121,6 +116,15 @@ jobs:
121116
working-directory: tests/webpack-projects/cypress-plugin
122117
install: false
123118
record: true
124-
start: yarn serve -l 8990 ./dist
119+
start: yarn serve -l 8991 ./dist
120+
env:
121+
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
122+
- uses: cypress-io/github-action@v2
123+
with:
124+
group: app-config-core-in-browser-test
125+
working-directory: tests/webpack-projects/app-config-core-in-browser
126+
install: false
127+
record: true
128+
start: yarn serve -l 8992 ./dist
125129
env:
126130
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}

.github/workflows/publishing.yml

Lines changed: 95 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -13,90 +13,131 @@ jobs:
1313
- uses: actions/setup-node@v1
1414
with:
1515
node-version: 14.x
16+
1617
- run: yarn install
17-
- run: yarn build
18+
1819
- uses: JS-DevTools/npm-publish@v1
1920
with:
2021
token: ${{ secrets.NPM_TOKEN }}
2122
access: public
22-
package: ./app-config/package.json
23-
24-
app-config-inject:
25-
runs-on: ubuntu-latest
26-
27-
steps:
28-
- uses: actions/checkout@v2
29-
- uses: actions/setup-node@v1
23+
package: ./app-config-cli/package.json
24+
- uses: JS-DevTools/npm-publish@v1
3025
with:
31-
node-version: 14.x
32-
- run: yarn install
33-
- run: yarn build
26+
token: ${{ secrets.NPM_TOKEN }}
27+
access: public
28+
package: ./app-config-config/package.json
29+
- uses: JS-DevTools/npm-publish@v1
30+
with:
31+
token: ${{ secrets.NPM_TOKEN }}
32+
access: public
33+
package: ./app-config-core/package.json
34+
- uses: JS-DevTools/npm-publish@v1
35+
with:
36+
token: ${{ secrets.NPM_TOKEN }}
37+
access: public
38+
package: ./app-config-cypress/package.json
39+
- uses: JS-DevTools/npm-publish@v1
40+
with:
41+
token: ${{ secrets.NPM_TOKEN }}
42+
access: public
43+
package: ./app-config-default-extensions/package.json
44+
- uses: JS-DevTools/npm-publish@v1
45+
with:
46+
token: ${{ secrets.NPM_TOKEN }}
47+
access: public
48+
package: ./app-config-encryption/package.json
49+
- uses: JS-DevTools/npm-publish@v1
50+
with:
51+
token: ${{ secrets.NPM_TOKEN }}
52+
access: public
53+
package: ./app-config-extensions/package.json
54+
- uses: JS-DevTools/npm-publish@v1
55+
with:
56+
token: ${{ secrets.NPM_TOKEN }}
57+
access: public
58+
package: ./app-config-generate/package.json
59+
- uses: JS-DevTools/npm-publish@v1
60+
with:
61+
token: ${{ secrets.NPM_TOKEN }}
62+
access: public
63+
package: ./app-config-git/package.json
3464
- uses: JS-DevTools/npm-publish@v1
3565
with:
3666
token: ${{ secrets.NPM_TOKEN }}
3767
access: public
3868
package: ./app-config-inject/package.json
39-
40-
app-config-webpack-plugin:
41-
runs-on: ubuntu-latest
42-
43-
steps:
44-
- uses: actions/checkout@v2
45-
- uses: actions/setup-node@v1
69+
- uses: JS-DevTools/npm-publish@v1
4670
with:
47-
node-version: 14.x
48-
- run: yarn install
49-
- run: yarn build
71+
token: ${{ secrets.NPM_TOKEN }}
72+
access: public
73+
package: ./app-config-lcdev-inject/package.json
5074
- uses: JS-DevTools/npm-publish@v1
5175
with:
5276
token: ${{ secrets.NPM_TOKEN }}
5377
access: public
54-
package: ./app-config-webpack-plugin/package.json
55-
56-
app-config-react-native-transformer:
57-
runs-on: ubuntu-latest
58-
59-
steps:
60-
- uses: actions/checkout@v2
61-
- uses: actions/setup-node@v1
78+
package: ./app-config-lcdev-main/package.json
79+
- uses: JS-DevTools/npm-publish@v1
6280
with:
63-
node-version: 14.x
64-
- run: yarn install
65-
- run: yarn build
81+
token: ${{ secrets.NPM_TOKEN }}
82+
access: public
83+
package: ./app-config-lcdev-react-native/package.json
84+
- uses: JS-DevTools/npm-publish@v1
85+
with:
86+
token: ${{ secrets.NPM_TOKEN }}
87+
access: public
88+
package: ./app-config-lcdev-webpack-plugin/package.json
89+
- uses: JS-DevTools/npm-publish@v1
90+
with:
91+
token: ${{ secrets.NPM_TOKEN }}
92+
access: public
93+
package: ./app-config-logging/package.json
94+
- uses: JS-DevTools/npm-publish@v1
95+
with:
96+
token: ${{ secrets.NPM_TOKEN }}
97+
access: public
98+
package: ./app-config-meta/package.json
99+
- uses: JS-DevTools/npm-publish@v1
100+
with:
101+
token: ${{ secrets.NPM_TOKEN }}
102+
access: public
103+
package: ./app-config-node/package.json
66104
- uses: JS-DevTools/npm-publish@v1
67105
with:
68106
token: ${{ secrets.NPM_TOKEN }}
69107
access: public
70108
package: ./app-config-react-native-transformer/package.json
71-
72-
app-config-vault:
73-
runs-on: ubuntu-latest
74-
75-
steps:
76-
- uses: actions/checkout@v2
77-
- uses: actions/setup-node@v1
109+
- uses: JS-DevTools/npm-publish@v1
78110
with:
79-
node-version: 14.x
80-
- run: yarn install
81-
- run: yarn build
111+
token: ${{ secrets.NPM_TOKEN }}
112+
access: public
113+
package: ./app-config-schema/package.json
114+
- uses: JS-DevTools/npm-publish@v1
115+
with:
116+
token: ${{ secrets.NPM_TOKEN }}
117+
access: public
118+
package: ./app-config-settings/package.json
119+
- uses: JS-DevTools/npm-publish@v1
120+
with:
121+
token: ${{ secrets.NPM_TOKEN }}
122+
access: public
123+
package: ./app-config-utils/package.json
124+
- uses: JS-DevTools/npm-publish@v1
125+
with:
126+
token: ${{ secrets.NPM_TOKEN }}
127+
access: public
128+
package: ./app-config-v1-compat/package.json
82129
- uses: JS-DevTools/npm-publish@v1
83130
with:
84131
token: ${{ secrets.NPM_TOKEN }}
85132
access: public
86133
package: ./app-config-vault/package.json
87-
88-
app-config-cypress:
89-
runs-on: ubuntu-latest
90-
91-
steps:
92-
- uses: actions/checkout@v2
93-
- uses: actions/setup-node@v1
134+
- uses: JS-DevTools/npm-publish@v1
94135
with:
95-
node-version: 14.x
96-
- run: yarn install
97-
- run: yarn build
136+
token: ${{ secrets.NPM_TOKEN }}
137+
access: public
138+
package: ./app-config-webpack-plugin/package.json
98139
- uses: JS-DevTools/npm-publish@v1
99140
with:
100141
token: ${{ secrets.NPM_TOKEN }}
101142
access: public
102-
package: ./app-config-cypress/package.json
143+
package: ./app-config/package.json

.github/workflows/standalone-project.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: standalone-project
22

33
on:
44
push:
5-
branches: '*'
5+
branches: 'master'
66

77
jobs:
88
build:
@@ -26,7 +26,7 @@ jobs:
2626
- run: yarn install && yarn build
2727
working-directory: ./app-config
2828

29-
- run: rm -rf ./node_modules ./app-config/node_modules
29+
- run: find . -name node_modules -exec rm -rf {} \;
3030
working-directory: .
3131

3232
- run: yarn install

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## v2.1.0
2+
3+
Modularizes code entirely, separating parsing extensions, encryption, etc.
4+
5+
Renames the main module to `@app-config/main`, aliased by `@lcdev/app-config`.
6+
7+
Adds `tag` option for `$git` directive.
8+
9+
Adds `$name` and `$fallback` options for `$substitute`.
10+
11+
Removes v1 support from webpack plugin.
12+
113
## v2.0.6
214

315
Returns an unsubscribe callback from `mockConfig`.

0 commit comments

Comments
 (0)