Skip to content

Commit

Permalink
chore: upgrade dependencies (#23)
Browse files Browse the repository at this point in the history
* chore: update yarn and storybook

* chore: use fetch depth 0 for commit watch
  • Loading branch information
imccausl committed Dec 18, 2023
1 parent 9190988 commit 2e4a876
Show file tree
Hide file tree
Showing 16 changed files with 9,010 additions and 11,146 deletions.
8 changes: 4 additions & 4 deletions .github/actions/prepare-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ name: prepare-env
description: Prepares Envionrment

runs:
using: 'composite'
using: "composite"

steps:
- name: Setup Node
uses: actions/setup-node@v3.5.1
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
node-version-file: ".nvmrc"
registry-url: "https://registry.npmjs.org"

- name: Enable corepack
run: corepack enable
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ env:
jobs:
commit-watch:
runs-on: ubuntu-latest
if: "github.event_name == 'pull_request' && !contains(github.event.head_commit.message, '[skip ci]')"
if: github.event_name == 'pull_request' && !contains(github.event.head_commit.message, '[skip ci]')
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Prepare Environment
uses: ./.github/actions/prepare-env
- name: Commit Watch
Expand All @@ -33,7 +33,7 @@ jobs:
build-and-test:
name: Build & Test
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
steps:
- uses: actions/checkout@v3

Expand Down
33 changes: 29 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,38 @@ jobs:

deploy-storybook:
name: Build & Deploy Storybook
permissions:
pages: write
id-token: write
concurrency:
group: "storybook"
cancel-in-progress: false
environment:
name: github-pages
url: ${{ steps.deploy-storybook.outputs.url }}
runs-on: ubuntu-latest
needs: [pre-release-check]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: ./.github/actions/prepare-env
- run: yarn docs:deploy
env:
GH_TOKEN: ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}

- name: Cache Storybook Assets
uses: actions/cache@v3
with:
path: ./.out
key: storybook-assets-${{ hashFiles('**/package.json', '**/yarn.lock') }}-${{ hashFiles('**.storybook.*')}}

- name: Build Storybook
run: yarn docs:build

- name: Upload Storybook Artifacts
uses: actions/upload-pages-artifacts@v2
with:
artifacts: ./.out

- name: Deploy Storybook
id: deploy-storybook
uses: actions/deploy-pages@v3
8 changes: 3 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
node_modules
lib
.yarn/**/*
!.yarn/sdks
!.yarn/sdks/**/*
!.yarn/releases
.yarn/cache
.yarn/unplugged
install-state.gz
.pnp.*
.out/**
.out
.turbo
lib/**
dist/**
build/**
.yarnrc.yml
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.18.0
lts/iron
31 changes: 27 additions & 4 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { dirname, join } from "path";
const config = {
typescript: {
check: false,
Expand All @@ -8,14 +9,36 @@ const config = {
propFilter: prop => prop.parent ? !/node_modules/.test(prop.parent.fileName) : true
}
},

stories: ['../packages/**/*/*.stories.mdx', '../packages/**/*/*.stories.@(js|jsx|ts|tsx)'],
addons: ['@storybook/addon-a11y', '@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-docs', '@storybook/addon-actions'],

addons: [
getAbsolutePath("@storybook/addon-a11y"),
getAbsolutePath("@storybook/addon-links"),
getAbsolutePath("@storybook/addon-essentials"),
getAbsolutePath("@storybook/addon-docs"),
getAbsolutePath("@storybook/addon-actions"),
getAbsolutePath("@storybook/addon-mdx-gfm")
],

features: {
previewMdx2: true
},
core: {
builder: 'webpack5'

core: {},

framework: {
name: getAbsolutePath("@storybook/react-webpack5"),
options: {}
},

docs: {
autodocs: true
}
};

export default config
export default config

function getAbsolutePath(value: string): any {
return dirname(require.resolve(join(value, "package.json")));
}
893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.0.2.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarn/sdks/prettier/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "prettier",
"version": "2.7.1-sdk",
"version": "2.8.8-sdk",
"main": "./index.js",
"type": "commonjs"
}
2 changes: 1 addition & 1 deletion .yarn/sdks/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typescript",
"version": "4.8.4-sdk",
"version": "5.3.3-sdk",
"main": "./lib/typescript.js",
"type": "commonjs"
}
3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
compressionLevel: mixed

yarnPath: .yarn/releases/yarn-4.0.2.cjs
40 changes: 18 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"author": "Ian McCausland <imccausl@gmail.com>",
"license": "MIT",
"private": true,
"packageManager": "yarn@3.2.4",
"packageManager": "yarn@4.0.2",
"workspaces": {
"packages": [
"packages/*"
Expand All @@ -18,9 +18,9 @@
},
"scripts": {
"g:tsc": "cd $INIT_CWD && tsc",
"start:dev": "start-storybook -p 6006",
"start:dev": "storybook dev -p 6006",
"docs:deploy": "yarn docs:build && storybook-to-ghpages --existing-output-dir=.out --ci",
"docs:build": "build-storybook -o .out -s .storybook/static",
"docs:build": "storybook build -o .out -s .storybook/static",
"g:test": "vitest",
"g:coverage": "vitest --coverage",
"commit-msg": "commitlint --edit",
Expand All @@ -41,31 +41,31 @@
"@commitlint/config-conventional": "^17.1.0",
"@mdx-js/react": "^2.1.3",
"@monodeploy/plugin-github": "^0.6.2",
"@storybook/addon-a11y": "^6.5.13",
"@storybook/addon-actions": "^6.5.13",
"@storybook/addon-docs": "^6.5.13",
"@storybook/addon-essentials": "^6.5.13",
"@storybook/addon-links": "^6.5.13",
"@storybook/builder-webpack5": "^6.5.13",
"@storybook/manager-webpack5": "^6.5.13",
"@storybook/mdx2-csf": "^0.0.3",
"@storybook/react": "^6.5.13",
"@storybook/addon-a11y": "^7.6.5",
"@storybook/addon-actions": "^7.6.5",
"@storybook/addon-docs": "^7.6.5",
"@storybook/addon-essentials": "^7.6.5",
"@storybook/addon-links": "^7.6.5",
"@storybook/addon-mdx-gfm": "^7.6.5",
"@storybook/mdx2-csf": "^1.1.0",
"@storybook/react": "^7.6.5",
"@storybook/react-docgen-typescript-plugin": "^1.0.1",
"@storybook/react-webpack5": "^7.6.5",
"@storybook/storybook-deployer": "^2.8.16",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^12.1.5",
"@tophat/conventional-changelog-config": "^1.0.1",
"@types/react": "^18.0.19",
"@types/react-dom": "^18.0.6",
"@typescript-eslint/eslint-plugin": "latest",
"@typescript-eslint/parser": "latest",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"@yarnpkg/sdks": "^3.0.0-rc.26",
"babel-loader": "^8.2.5",
"babel-plugin-module-resolver": "^4.1.0",
"core-js": "^3.25.1",
"eslint": "^8.23.0",
"eslint-config-turbo": "^0.0.4",
"eslint-plugin-react": "latest",
"eslint-config-turbo": "^1.11.2",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-storybook": "^0.6.6",
"eslint-plugin-testing-library": "^5.9.1",
"eslint-plugin-turbo": "^0.0.4",
Expand All @@ -79,20 +79,16 @@
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-is": "^17.0.2",
"storybook": "^7.6.5",
"styled-components": "^5.3.5",
"turbo": "^1.4.6",
"typescript": "^4.8.4",
"typescript": "^5.3.3",
"vite": "^3.2.2",
"vitest": "^0.24.3",
"webpack": "^5.74.0"
},
"resolutions": {
"@types/react": "17.0.2",
"@types/react-dom": "17.0.2"
},
"storybook-deployer": {
"gitUsername": "Documentation Deployer",
"gitEmail": "imccausl@gmail.com",
"commitMessage": "chore(Deploy): Deploy docs to GitHub Pages"
}
}
3 changes: 2 additions & 1 deletion packages/button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
},
"devDependencies": {
"@mdx-js/react": "^2.1.3",
"@storybook/addon-docs": "^6.5.10",
"@storybook/addon-docs": "^7.6.5",
"@storybook/react": "^7.6.5",
"@testing-library/react": "^12.1.5",
"@types/react": "17.0.2",
"@types/react-dom": "17.0.2",
Expand Down
21 changes: 0 additions & 21 deletions packages/button/stories/button.stories.mdx

This file was deleted.

14 changes: 14 additions & 0 deletions packages/button/stories/button.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Button } from '../src'
import type { Meta, StoryObj } from '@storybook/react'

const meta: Meta<typeof Button> = {
component: Button
}

export default meta

type Story = StoryObj<typeof Button>

export const Default: Story = {
args: {}
}
22 changes: 17 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
{
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"target": "es2018",
"allowJs": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"jsx": "react-jsx",
"moduleResolution": "node",
"moduleResolution": "Node",
"noEmit": false,
"noFallthroughCasesInSwitch": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"declaration": false,
"types": ["vitest/globals"]
"types": [
"vitest/globals"
]
},
"include": ["packages", "@types"],
"exclude": ["**/node_modules", "**/lib/**/*"]
"include": [
"packages",
"@types"
],
"exclude": [
"**/node_modules",
"lib"
]
}

0 comments on commit 2e4a876

Please sign in to comment.