Skip to content

Commit

Permalink
Merge pull request #427 from phase2/feature/storybook-7.4.6
Browse files Browse the repository at this point in the history
Update Storybook to 7.4.6.
  • Loading branch information
himerus authored Oct 16, 2023
2 parents 3005e66 + 895da58 commit 4b67a86
Show file tree
Hide file tree
Showing 6 changed files with 467 additions and 379 deletions.
45 changes: 45 additions & 0 deletions .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/sh

if [ "$LEFTHOOK" = "0" ]; then
exit 0
fi

call_lefthook()
{
dir="$(git rev-parse --show-toplevel)"
osArch=$(uname | tr '[:upper:]' '[:lower:]')
cpuArch=$(uname -m | sed 's/aarch64/arm64/')

if lefthook -h >/dev/null 2>&1
then
lefthook "$@"
elif test -f "$dir/node_modules/lefthook/bin/index.js"
then
"$dir/node_modules/lefthook/bin/index.js" "$@"
elif test -f "$dir/node_modules/@evilmartians/lefthook/bin/lefthook_${osArch}_${cpuArch}/lefthook"
then
"$dir/node_modules/@evilmartians/lefthook/bin/lefthook_${osArch}_${cpuArch}/lefthook" "$@"
elif test -f "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook_${osArch}_${cpuArch}/lefthook"
then
"$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook_${osArch}_${cpuArch}/lefthook" "$@"
elif bundle exec lefthook -h >/dev/null 2>&1
then
bundle exec lefthook "$@"
elif yarn lefthook -h >/dev/null 2>&1
then
yarn lefthook "$@"
elif pnpm lefthook -h >/dev/null 2>&1
then
pnpm lefthook "$@"
elif command -v npx >/dev/null 2>&1
then
npx @evilmartians/lefthook "$@"
elif swift package plugin lefthook >/dev/null 2>&1
then
swift package --disable-sandbox plugin lefthook "$@"
else
echo "Can't find lefthook in PATH"
fi
}

call_lefthook run "prepare-commit-msg" "$@"
17 changes: 17 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# EXAMPLE USAGE:
#
# Refer for explanation to following link:
# https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md
#
# pre-push:
# commands:
# packages-audit:
# tags: frontend security
# run: yarn audit
#
pre-commit:
parallel: true
commands:
eslint:
glob: '*.{js,ts,jsx,tsx,mdx,cjs,mjs}'
run: yarn eslint {staged_files}
17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@
"@commitlint/cli": "^17.4.0",
"@commitlint/config-conventional": "^17.4.0",
"@open-wc/testing": "^3.0.0-next.2",
"@storybook/addon-actions": "^7.4.0",
"@storybook/addon-docs": "^7.4.0",
"@storybook/addon-essentials": "^7.4.0",
"@storybook/addon-links": "^7.4.0",
"@storybook/web-components": "^7.4.0",
"@storybook/web-components-vite": "^7.4.0",
"@storybook/addon-actions": "^7.4.6",
"@storybook/addon-docs": "^7.4.6",
"@storybook/addon-essentials": "^7.4.6",
"@storybook/addon-links": "^7.4.6",
"@storybook/web-components": "^7.4.6",
"@storybook/web-components-vite": "^7.4.6",
"@types/estree": "^0.0.47",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
Expand All @@ -109,11 +109,12 @@
"eslint-config-prettier": "^7.2.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-react": "^7.23.0",
"eslint-plugin-storybook": "^0.6.13",
"eslint-plugin-storybook": "^0.6.15",
"gaze": "^1.1.3",
"husky": "^8.0.3",
"jest": "^26.6.3",
"jest-cli": "^26.6.3",
"lefthook": "^1.5.2",
"lint-staged": "^10.5.4",
"lit-analyzer": "^1.2.1",
"lit-html": "^2.3.1",
Expand All @@ -131,7 +132,7 @@
"react-syntax-highlighter": "^15.5.0",
"rimraf": "^3.0.2",
"rsync": "^0.6.1",
"storybook": "^7.4.0",
"storybook": "^7.4.6",
"svgo": "^2.8.0",
"tailwindcss": "3.0.0",
"ts-lit-plugin": "^1.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/documentation/outline-storybook/config/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
modernInlineRender: true,
},
framework: {
name: getAbsolutePath('@storybook/web-components-vite'),
name: '@storybook/web-components-vite',
options: {},
},
docs: {
Expand Down
15 changes: 8 additions & 7 deletions packages/outline-templates/default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,12 @@
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-replace": "^5.0.0",
"@rollup/plugin-terser": "^0.4.0",
"@storybook/addon-actions": "^7.0.12",
"@storybook/addon-essentials": "^7.0.12",
"@storybook/addon-links": "^7.0.12",
"@storybook/web-components": "^7.0.12",
"@storybook/web-components-vite": "^7.0.12",
"@storybook/addon-actions": "^7.4.6",
"@storybook/addon-docs": "^7.4.6",
"@storybook/addon-essentials": "^7.4.6",
"@storybook/addon-links": "^7.4.6",
"@storybook/web-components": "^7.4.6",
"@storybook/web-components-vite": "^7.4.6",
"@tailwindcss/aspect-ratio": "^0.4.0",
"@tailwindcss/forms": "^0.4.0",
"@tailwindcss/typography": "^0.5.0",
Expand All @@ -152,7 +153,7 @@
"eslint-config-prettier": "^7.2.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-react": "^7.23.0",
"eslint-plugin-storybook": "^0.6.12",
"eslint-plugin-storybook": "^0.6.15",
"gaze": "^1.1.3",
"husky": "^4.3.8",
"lint-staged": "^10.5.4",
Expand All @@ -174,7 +175,7 @@
"rollup-plugin-typescript2": "^0.34.1",
"rsync": "^0.6.1",
"sinon": "^13.0.2",
"storybook": "^7.0.12",
"storybook": "^7.4.6",
"svgo": "^2.7",
"tailwindcss": "^3.0.0",
"ts-lit-plugin": "^1.2.1",
Expand Down
Loading

0 comments on commit 4b67a86

Please sign in to comment.