Skip to content

Commit 90624cf

Browse files
authoredNov 5, 2021
feat: revamp the repo (#19)
BREAKING CHANGE - Refactor streams into @web-std/stream - Enable typecheck for @web-std/fetch - Generate types for @web-std/fetch from source
1 parent 874a28b commit 90624cf

File tree

130 files changed

+2051
-1855
lines changed

Some content is hidden

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

130 files changed

+2051
-1855
lines changed
 

‎.github/workflows/blob.yml

+10-73
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ on:
55
branches:
66
- main
77
paths:
8-
- "blob/**"
8+
- "packages/blob/**"
99
pull_request:
1010
branches:
1111
- main
1212
paths:
13-
- "blob/**"
13+
- "packages/blob/**"
1414
- ".github/workflows/blob.yml"
1515
jobs:
1616
check:
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
matrix:
2121
node-version:
22-
- 15
22+
- 16
2323
project:
2424
- blob
2525
steps:
@@ -30,25 +30,13 @@ jobs:
3030
with:
3131
node-version: ${{ matrix.node-version }}
3232

33-
- name: Restore yarn cache
34-
id: yarn-cache-dir-path
35-
run: echo "::set-output name=dir::$(yarn cache dir)"
36-
37-
- uses: actions/cache@v2
38-
id: yarn-cache
39-
with:
40-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
41-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
42-
restore-keys: |
43-
${{ runner.os }}-yarn-
44-
4533
- name: Install dependencies
46-
run: yarn install
34+
uses: bahmutov/npm-install@v1
4735

4836
- name: Typecheck
4937
uses: gozala/typescript-error-reporter-action@v1.0.8
5038
with:
51-
project: ${{matrix.project}}/tsconfig.json
39+
project: packages/${{matrix.project}}/tsconfig.json
5240
test:
5341
name: Test
5442
runs-on: ${{ matrix.os }}
@@ -57,7 +45,7 @@ jobs:
5745
matrix:
5846
node-version:
5947
- 14
60-
- 15
48+
- 16
6149
os:
6250
- ubuntu-latest
6351
- windows-latest
@@ -73,65 +61,14 @@ jobs:
7361
with:
7462
node-version: ${{ matrix.node-version }}
7563

76-
- name: Restore yarn cache
77-
id: yarn-cache-dir-path
78-
run: echo "::set-output name=dir::$(yarn cache dir)"
79-
80-
- uses: actions/cache@v2
81-
id: yarn-cache
82-
with:
83-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
84-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
85-
restore-keys: |
86-
${{ runner.os }}-yarn-
87-
8864
- name: Install dependencies
89-
run: yarn install
65+
uses: bahmutov/npm-install@v1
9066

9167
- name: Test (ES)
92-
run: yarn --cwd ${{matrix.project}} test:es
68+
run: yarn --cwd packages/${{matrix.project}} test:es
9369

9470
- name: Test (CJS)
95-
run: yarn --cwd ${{matrix.project}} test:cjs
71+
run: yarn --cwd packages/${{matrix.project}} test:cjs
9672

9773
- name: Test (Web)
98-
run: yarn --cwd ${{matrix.project}} test:web
99-
publish:
100-
name: Publish
101-
needs:
102-
- test
103-
- check
104-
runs-on: ubuntu-latest
105-
strategy:
106-
matrix:
107-
project:
108-
- blob
109-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
110-
steps:
111-
- uses: actions/checkout@v2
112-
113-
- name: Restore yarn cache
114-
id: yarn-cache-dir-path
115-
run: echo "::set-output name=dir::$(yarn cache dir)"
116-
117-
- uses: actions/cache@v2
118-
id: yarn-cache
119-
with:
120-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
121-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
122-
restore-keys: |
123-
${{ runner.os }}-yarn-
124-
125-
- name: Install
126-
run: yarn install
127-
128-
- name: Build
129-
run: yarn --cwd ${{matrix.project}} build
130-
131-
- name: Publish
132-
uses: mikeal/merge-release@master
133-
env:
134-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
135-
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
136-
DEPLOY_DIR: ${{matrix.project}}
137-
SRC_PACKAGE_DIR: ${{matrix.project}}
74+
run: yarn --cwd packages/${{matrix.project}} test:web

‎.github/workflows/fetch.yml

+7-33
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ on:
55
branches:
66
- main
77
paths:
8-
- "fetch/**"
8+
- "packages/fetch/**"
99
pull_request:
1010
branches:
1111
- main
1212
paths:
13-
- "fetch/**"
13+
- "packages/fetch/**"
1414
- ".github/workflows/fetch.yml"
1515

1616
jobs:
@@ -37,7 +37,7 @@ jobs:
3737
- name: Typecheck
3838
uses: gozala/typescript-error-reporter-action@v1.0.8
3939
with:
40-
project: ${{matrix.project}}/tsconfig.json
40+
project: packages/${{matrix.project}}/tsconfig.json
4141

4242
test:
4343
name: Test
@@ -56,10 +56,10 @@ jobs:
5656
- fetch
5757
exclude:
5858
- os: windows-latest
59-
node-version: 15
59+
node-version: 14
6060
# On macOS, run tests with only the LTS environments.
6161
- os: macos-latest
62-
node-version: 15
62+
node-version: 14
6363

6464
steps:
6565
- uses: actions/checkout@v2
@@ -73,7 +73,7 @@ jobs:
7373
uses: bahmutov/npm-install@v1
7474

7575
- name: Test (ESM)
76-
run: yarn --cwd ${{matrix.project}} test -- --colors
76+
run: yarn --cwd packages/${{matrix.project}} test -- --colors
7777

7878
# upload coverage only once
7979
- name: Coveralls
@@ -83,30 +83,4 @@ jobs:
8383
github-token: ${{ secrets.GITHUB_TOKEN }}
8484

8585
- name: Test (CJS)
86-
run: yarn --cwd ${{matrix.project}} test:cjs
87-
publish:
88-
name: Publish
89-
needs:
90-
- test
91-
runs-on: ubuntu-latest
92-
strategy:
93-
matrix:
94-
project:
95-
- fetch
96-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
97-
steps:
98-
- uses: actions/checkout@v2
99-
100-
- name: Install
101-
uses: bahmutov/npm-install@v1
102-
103-
- name: Build
104-
run: yarn --cwd ${{matrix.project}} build
105-
106-
- name: Publish
107-
uses: mikeal/merge-release@master
108-
env:
109-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
110-
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
111-
DEPLOY_DIR: ${{matrix.project}}
112-
SRC_PACKAGE_DIR: ${{matrix.project}}
86+
run: yarn --cwd packages/${{matrix.project}} test:cjs

0 commit comments

Comments
 (0)
Please sign in to comment.