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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: approve patch #2041

Merged
merged 2 commits into from
Feb 23, 2024
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
6 changes: 6 additions & 0 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ jobs:
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve a PR
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Enable auto-merge for Dependabot PRs
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
run: gh pr merge --auto --merge "$PR_URL"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"npx wait-on tcp:6006 && npm test"

- name: compressed-size-action
uses: preactjs/compressed-size-action@2.5.0

Check warning on line 43 in .github/workflows/node.js.yml

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (preactjs)
with:
pattern: "./packages/ui/lib/**/*.{js,css,html,json}"
exclude: "{**/*.map,**/node_modules/**}"
Expand All @@ -53,7 +53,7 @@
- name: Checkout
uses: actions/checkout@v4
- name: Setup Biome
uses: biomejs/setup-biome@v2

Check warning on line 56 in .github/workflows/node.js.yml

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (biomejs)
with:
version: latest
- name: Run Biome
Expand All @@ -66,8 +66,10 @@
with:
fetch-depth: 0 # 👈 Required to retrieve git history
- name: Install dependencies
uses: bahmutov/npm-install@v1

Check warning on line 69 in .github/workflows/node.js.yml

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (bahmutov)
- name: Publish to Chromatic
uses: chromaui/action@v10

Check warning on line 71 in .github/workflows/node.js.yml

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (chromaui)
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
onlyChanged: true # 👈 Required option to enable TurboSnap
skip: "@(renovate/**|dependabot/**)"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.turbo/
lib/
storybook-static/

### Generated by gibo (https://github.com/simonwhitaker/gibo)

Check warning on line 5 in .gitignore

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (gibo)
### https://raw.github.com/github/gitignore/4488915eec0b3a45b5c63ead28f286819c0917de/Node.gitignore

# Logs
Expand All @@ -17,12 +18,12 @@
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids

Check warning on line 21 in .gitignore

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (pids)
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover

Check warning on line 26 in .gitignore

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (jscoverage)
lib-cov

# Coverage directory used by tools like istanbul
Expand All @@ -39,7 +40,7 @@
bower_components

# node-waf configuration
.lock-wscript

Check warning on line 43 in .gitignore

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (wscript)

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
Expand All @@ -61,9 +62,9 @@
.eslintcache

# Optional stylelint cache
.stylelintcache

Check warning on line 65 in .gitignore

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (stylelintcache)

# Microbundle cache

Check warning on line 67 in .gitignore

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (Microbundle)
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
Expand Down
10 changes: 9 additions & 1 deletion cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,13 @@
"rust",
"typescript"
],
"words": ["Autoprefix", "gtag", "lucide", "preact", "serde"]
"words": [
"autodocs",
"Autoprefix",
"gtag",
"lucide",
"preact",
"serde",
"turbosnap"
]
}
9 changes: 8 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions packages/ui/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import type { StorybookConfig } from "@storybook/preact-vite";
import { mergeConfig } from "vite";
import turbosnap from "vite-plugin-turbosnap";

const config: StorybookConfig = {
stories: ["../src/**/*.stories.@(ts|tsx)"],
Expand All @@ -12,6 +14,15 @@ const config: StorybookConfig = {
name: "@storybook/preact-vite",
options: {},
},
async viteFinal(config, { configType }) {
const isProduction = configType === "PRODUCTION";

return mergeConfig(config, {
plugins: isProduction
? [turbosnap({ rootDir: config.root ?? process.cwd() })]
: [],
});
},
docs: {
autodocs: "tag",
},
Expand Down
3 changes: 2 additions & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"@testing-library/preact": "^3.2.3",
"@twind/preset-autoprefix": "^1.0.7",
"@twind/preset-tailwind": "^1.1.4",
"storybook": "^7.6.17"
"storybook": "^7.6.17",
"vite-plugin-turbosnap": "^1.0.3"
},
"typings": "lib/index.d.ts",
"dependencies": {
Expand Down
Loading