Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃┕ fix: do not bud clean multi-config root #1963

Merged
merged 5 commits into from
Dec 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 5 additions & 17 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Deploy docs

on:
push:
tags:
- 'v*'
branches:
- main

jobs:
release:
Expand All @@ -18,22 +18,10 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16.18.0
cache: yarn

- name: Cache
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"

- name: Restore
uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: yarn install
run: yarn install
- name: yarn
run: yarn

- name: yarn @bud build
run: yarn @bud build
Expand Down
31 changes: 7 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,48 +20,31 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16.18.0

- name: Cache
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"

- name: Restore
uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
cache: yarn

- name: set npmAuthToken
run: |
yarn config set npmAuthToken ${{ secrets.NODE_AUTH_TOKEN }}

- name: Set npmPublishRegistry
run: |
yarn config set npmPublishRegistry https://registry.npmjs.org/
run: yarn config set npmPublishRegistry https://registry.npmjs.org/

- name: Set npmRegistryServer
run: |
yarn config set npmRegistryServer https://registry.npmjs.org/
run: yarn config set npmRegistryServer https://registry.npmjs.org/

- name: Release v${{ github.event.inputs.version }}
run: |
yarn @bud release --tag latest --version ${{ github.event.inputs.version }}
run: yarn @bud release --tag latest --version ${{ github.event.inputs.version }}

- name: reset npmAuthToken
run: |
yarn config set npmAuthToken "${NPM_AUTH_TOKEN:-fallback}"
- name: Reset npmAuthToken
run: yarn config set npmAuthToken "${NPM_AUTH_TOKEN:-fallback}"

- name: Configure Git
run: |
git config user.name "Roots Ladybud"
git config user.email "<>"

- name: Create v${{ github.event.inputs.version }} branch
run: |
git checkout -b v${{ github.event.inputs.version }}
run: git checkout -b v${{ github.event.inputs.version }}

- name: Commit v${{ github.event.inputs.version }}
run: |
Expand Down
34 changes: 9 additions & 25 deletions .github/workflows/test.e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,41 +20,25 @@ jobs:
runs-on: ${{matrix.platform}}

steps:
- name: Setup
uses: actions/setup-node@v3
with:
node-version: ${{matrix.node}}

- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Cache
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"

- name: Restore
uses: actions/cache@v3
id: yarn-cache
- name: Setup
uses: actions/setup-node@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version: ${{matrix.node}}
cache: yarn

- name: yarn install
run: |
yarn install
- name: yarn
run: yarn

- name: yarn @bud registry start
run: |
yarn @bud registry start
run: yarn @bud registry start

- name: yarn @bud release --tag latest
run: |
yarn @bud release --tag latest
run: yarn @bud release --tag latest

- name: yarn @bud test e2e
run: |
yarn @bud test e2e
run: yarn @bud test e2e
39 changes: 11 additions & 28 deletions .github/workflows/test.format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,49 +16,32 @@ jobs:
node:
- 16.18.0

name: test node@${{matrix.node}}/${{matrix.platform}}
name: format-check (node@v${{matrix.node}}/${{matrix.platform}})
runs-on: ${{matrix.platform}}

steps:
- name: Setup
uses: actions/setup-node@v3
with:
node-version: ${{matrix.node}}

- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Cache
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"

- name: Restore
uses: actions/cache@v3
id: yarn-cache
- name: Setup
uses: actions/setup-node@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version: ${{matrix.node}}
cache: yarn

- name: yarn install
run: |
yarn install
- name: yarn
run: yarn

- name: yarn @bud lint dependencies
run: |
yarn @bud lint dependencies
run: yarn @bud lint dependencies

- name: yarn @bud lint
run: |
yarn @bud lint
run: yarn @bud lint

- name: yarn @bud format
run: |
yarn @bud format --no-fix
run: yarn @bud format --no-fix

- name: yarn @bud lint exports
run: |
yarn @bud lint exports
run: yarn @bud lint exports
36 changes: 10 additions & 26 deletions .github/workflows/test.integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,45 +16,29 @@ jobs:
node:
- 16.18.0

name: test node@${{matrix.node}}/${{matrix.platform}}
name: integration test (node@v${{matrix.node}}/${{matrix.platform}})
runs-on: ${{matrix.platform}}

steps:
- name: Setup
uses: actions/setup-node@v3
with:
node-version: ${{matrix.node}}

- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Cache
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"

- name: Restore
uses: actions/cache@v3
id: yarn-cache
- name: Setup
uses: actions/setup-node@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version: ${{matrix.node}}
cache: yarn

- name: yarn install
run: |
yarn install
- name: yarn
run: yarn

- name: yarn @bud registry start
run: |
yarn @bud registry start
run: yarn @bud registry start

- name: yarn @bud release --tag latest
run: |
yarn @bud release --tag latest
run: yarn @bud release --tag latest

- name: yarn @bud test integration
run: |
yarn @bud test integration run
run: yarn @bud test integration run
30 changes: 8 additions & 22 deletions .github/workflows/test.unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,23 @@ jobs:
node:
- 16.18.0

name: test node@${{matrix.node}}/${{matrix.platform}}
name: unit test (node@v${{matrix.node}}/${{matrix.platform}})
runs-on: ${{matrix.platform}}

steps:
- name: Setup
uses: actions/setup-node@v3
with:
node-version: ${{matrix.node}}

- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Cache
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"

- name: Restore
uses: actions/cache@v3
id: yarn-cache
- name: Setup
uses: actions/setup-node@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version: ${{matrix.node}}
cache: yarn

- name: yarn install
run: |
yarn install
- name: yarn
run: yarn

- name: yarn @bud test unit
run: |
yarn @bud test unit run --coverage
run: yarn @bud test unit run --coverage
1 change: 1 addition & 0 deletions config/eslint.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ module.exports = {
],
[`n/no-missing-import`]: OFF,
[`n/no-path-concat`]: ERROR,
[`n/shebang`]: OFF,
[`react/prop-types`]: OFF,
[`react/react-in-jsx-scope`]: ERROR,
[`react-hooks/rules-of-hooks`]: ERROR,
Expand Down
1 change: 1 addition & 0 deletions examples/react/bud.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ module.exports = async app => {
.when(app.isProduction, () => {
app.runtime('single').splitChunks().minimize()
})
.serve(3015)
}
12 changes: 10 additions & 2 deletions sources/@roots/bud-compiler/src/compiler.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,13 @@ d * @public
async (_stats, callback) => {
try {
await this.app.hooks.fire(`compiler.after`)
} catch (error) {}
} catch (error) {
const err = new Error(
error?.message ?? error?.toString() ?? ``,
)
err.name = `CompilerError (afterEmit)`
throw err
}

return callback()
},
Expand All @@ -112,7 +118,9 @@ d * @public
})

return this.instance
} catch (error) {}
} catch (error) {
throw error
}
}

/**
Expand Down
Loading