Skip to content

Commit

Permalink
Merge pull request #46 from storybookjs/pnpm
Browse files Browse the repository at this point in the history
Migrate to pnpm, Upgrade dependencies
  • Loading branch information
JReinhold authored Nov 23, 2023
2 parents 48eef7f + 5fbb9d6 commit b6fa7ef
Show file tree
Hide file tree
Showing 14 changed files with 5,146 additions and 6,846 deletions.
14 changes: 9 additions & 5 deletions .github/actions/prepare-deps/action.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
name: 'Prepare Dependencies'
description: 'Prepares all Node and Yarn dependencies'
description: 'Prepares all Node and pnpm dependencies'
runs:
using: 'composite'
steps:
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '14'
cache: 'yarn'
cache: 'pnpm'

- name: Install dependencies
shell: bash
run: yarn install --frozen-lockfile
run: pnpm install
31 changes: 9 additions & 22 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,65 +12,52 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Prepare dependencies
uses: ./.github/actions/prepare-deps

- name: Check formatting with Prettier
run: yarn format:check

# lint:
# name: Lint
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3

# - name: Prepare dependencies
# uses: ./.github/actions/prepare-deps

# - name: Lint
# run: yarn lint
run: pnpm format:check

type-check:
name: Check Types
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Prepare dependencies
uses: ./.github/actions/prepare-deps

- name: Check TypeScript Types
run: yarn type-check
run: pnpm type-check

build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Prepare dependencies
uses: ./.github/actions/prepare-deps

- name: Build
run: yarn build
run: pnpm build

smoke-test:
name: Smoke test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Prepare dependencies
uses: ./.github/actions/prepare-deps

- name: Build
run: yarn build
run: pnpm build

- name: Start
run: yarn start:all
run: pnpm start-all
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Prepare repository
run: git fetch --unshallow --tags
Expand All @@ -16,11 +16,10 @@ jobs:
uses: ./.github/actions/prepare-deps

- name: Build
run: yarn build
run: pnpm build

- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn release
run: pnpm release
29 changes: 3 additions & 26 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ mini
maxi
svelte5

# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,macos,windows,node,yarn
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,macos,windows,node,yarn
# Created by https://www.toptal.com/developers/gitignore/api/node,macos,windows,visualstudiocode
# Edit at https://www.toptal.com/developers/gitignore?templates=node,macos,windows,visualstudiocode

### macOS ###
# General
Expand Down Expand Up @@ -192,12 +192,6 @@ dist
.history
.ionide

# Support for Project snippet scope
.vscode/*.code-snippets

# Ignore code-workspaces
*.code-workspace

### Windows ###
# Windows thumbnail cache files
Thumbs.db
Expand All @@ -224,21 +218,4 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk

### yarn ###
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored

.yarn/*
!.yarn/releases
!.yarn/patches
!.yarn/plugins
!.yarn/sdks
!.yarn/versions

# if you are NOT using Zero-installs, then:
# comment the following lines
# !.yarn/cache

# and uncomment the following lines
.pnp.*

# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,macos,windows,node,yarn
# End of https://www.toptal.com/developers/gitignore/api/node,macos,windows,visualstudiocode
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm-lock.yaml
783 changes: 0 additions & 783 deletions .yarn/releases/yarn-3.2.3.cjs

This file was deleted.

5 changes: 0 additions & 5 deletions .yarnrc

This file was deleted.

3 changes: 0 additions & 3 deletions .yarnrc.yml

This file was deleted.

61 changes: 30 additions & 31 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,54 @@
"name": "create-svelte-with-args",
"version": "5.0.0",
"description": "A small CLI wrapper around the create-svelte package that enables you to replace the interactive prompts with CLI arguments.",
"bin": "dist/bin.js",
"repository": "[email protected]:storybookjs/create-svelte-with-args.git",
"author": "Jeppe Reinhold <[email protected]>",
"keywords": [
"svelte",
"create-svelte",
"cli"
],
"repository": "[email protected]:storybookjs/create-svelte-with-args.git",
"license": "MIT",
"author": "Jeppe Reinhold <[email protected]>",
"type": "module",
"bin": "dist/bin.js",
"files": [
"dist"
],
"scripts": {
"build": "tsup",
"prestart": "yarn build",
"start": "node ./dist/bin.js",
"start:default": "yarn start --name=default --template=default --types=checkjs --no-prettier --no-eslint --no-playwright --no-vitest --no-svelte5",
"start:mini": "yarn start --name=mini --template=skeleton --types=null --no-prettier --no-eslint --no-playwright --no-vitest --no-svelte5",
"start:maxi": "yarn start --name=maxi --template=default --types=typescript --prettier --eslint --playwright --vitest --no-svelte5",
"start:svelte5": "yarn start --name=svelte5 --template=default --types=typescript --prettier --eslint --playwright --vitest --svelte5",
"start:dry": "yarn start:default --dry",
"start:all": "yarn start:default && yarn start:mini && yarn start:maxi && yarn start:svelte5 && yarn start:dry",
"check-all": "npm-run-all --aggregate-output --print-label --parallel format:check type-check start:**",
"format": "prettier --write .",
"format:check": "prettier --check .",
"type-check": "tsc --noEmit",
"check-all": "yarn format:check && yarn type-check && yarn build && yarn start:all",
"release": "auto shipit"
},
"files": [
"dist"
],
"packageManager": "[email protected]",
"engines": {
"node": ">=10.13.0",
"yarn": ">=1.3.2"
"release": "auto shipit",
"start": "node ./dist/bin.js",
"start-all": "npm-run-all --aggregate-output --print-label build --parallel start:**",
"start:default": "pnpm start --name=default --template=default --types=checkjs --no-prettier --no-eslint --no-playwright --no-vitest --no-svelte5",
"start:dry": "pnpm start:default --dry",
"start:maxi": "pnpm start --name=maxi --template=default --types=typescript --prettier --eslint --playwright --vitest --no-svelte5",
"start:mini": "pnpm start --name=mini --template=skeleton --types=null --no-prettier --no-eslint --no-playwright --no-vitest --no-svelte5",
"start:svelte5": "pnpm start --name=svelte5 --template=default --types=typescript --prettier --eslint --playwright --vitest --svelte5",
"type-check": "tsc --noEmit"
},
"prettier": "@storybook/linter-config/prettier.config.js",
"dependencies": {
"create-svelte": "5.3.2",
"yargs": "^17.5.1"
"yargs": "^17.7.2"
},
"devDependencies": {
"@storybook/linter-config": "^3.1.2",
"@tsconfig/node14": "^1.0.3",
"@types/node": "^18.7.23",
"@types/yargs": "^17.0.13",
"auto": "^10.37.6",
"prettier": "^2.7.1",
"tsup": "^6.2.3",
"typescript": "^4.8.4"
"@tsconfig/node18": "^18.2.2",
"@types/node": "^18.18.12",
"@types/yargs": "^17.0.32",
"auto": "^11.0.4",
"npm-run-all": "^4.1.5",
"prettier": "^3.1.0",
"tsup": "^8.0.1",
"typescript": "^5.3.2"
},
"packageManager": "[email protected]",
"engines": {
"node": ">=18.0.0"
},
"prettier": "@storybook/linter-config/prettier.config.js",
"auto": {
"plugins": [
"npm",
Expand Down
Loading

0 comments on commit b6fa7ef

Please sign in to comment.