Skip to content

Commit

Permalink
switch to pnpm (#568)
Browse files Browse the repository at this point in the history
* switch to pnpm

* chore(dependencies): updated changesets for modified dependencies

* add missing deps

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
dimaMachina and github-actions[bot] authored Nov 3, 2022
1 parent d9a9c84 commit 556feba
Show file tree
Hide file tree
Showing 18 changed files with 15,803 additions and 14,397 deletions.
8 changes: 8 additions & 0 deletions .changeset/@theguild_components-568-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@theguild/components": patch
---
dependencies updates:
- Updated dependency [`@next/[email protected]` ↗︎](https://www.npmjs.com/package/@next/bundle-analyzer/v/12.3.2) (from `^12.3.1`, in `dependencies`)
- Updated dependency [`[email protected]` ↗︎](https://www.npmjs.com/package/unist-util-visit/v/4.1.1) (from `^4.1.1`, in `dependencies`)
- Added dependency [`@headlessui/react@^1.7.3` ↗︎](https://www.npmjs.com/package/@headlessui/react/v/1.7.3) (to `dependencies`)
- Added dependency [`semver@^7.3.8` ↗︎](https://www.npmjs.com/package/semver/v/7.3.8) (to `dependencies`)
26 changes: 10 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,27 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: pnpm/[email protected]
with:
version: 7

- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16

- uses: actions/cache@v3
name: Cache node_modules
with:
path: '**/node_modules'
key: ${{runner.os}}-yarn-${{hashFiles('**/yarn.lock')}}-v2
restore-keys: |
${{runner.os}}-yarn-v2
cache: pnpm

- name: Install Dependencies
run: yarn
run: pnpm i

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

- name: Lint Prettier
run: yarn lint:prettier
run: pnpm lint:prettier

- name: Lint ESLint
run: yarn lint
run: pnpm lint

- name: Build Storybook
run: yarn build-storybook

- name: Build Next.js
run: yarn workspace website build
run: pnpm build-storybook
1 change: 1 addition & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
npmTag: alpha
buildScript: build
nodeVersion: 18
packageManager: pnpm
secrets:
githubToken: ${{ secrets.GITHUB_TOKEN }}
npmToken: ${{ secrets.NPM_AUTH_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
with:
releaseScript: release
nodeVersion: 18
packageManager: pnpm
secrets:
githubToken: ${{ secrets.GITHUB_TOKEN }}
npmToken: ${{ secrets.NPM_AUTH_TOKEN }}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shell-emulator=true
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ storybook-static/
.next/
.husky/_/
.changeset/*.md
.bob/
website/out/
pnpm-lock.yaml
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Example page: <https://the-guild-components.vercel.app>
We recommend running storybook for developing the components.

```sh
yarn start
pnpm start
```

Visit <http://localhost:54533>
Expand Down
22 changes: 8 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
"build": "turbo run build",
"build:css": "NODE_ENV=production tailwindcss --config tailwind.config.cjs --postcss --output packages/components/style.css",
"build-storybook": "storybook build",
"next:build": "cd website && yarn build && yarn start",
"prettier": "prettier --write --list-different .",
"lint:prettier": "prettier --check .",
"lint": "eslint --ignore-path .gitignore .",
"type-check": "tsc",
"type-check:watch": "tsc --watch",
"prepare": "husky install",
"prerelease": "yarn build",
"prerelease": "pnpm build",
"release": "changeset publish"
},
"devDependencies": {
"@algolia/autocomplete-theme-classic": "1.7.2",
"@changesets/changelog-github": "0.4.7",
"@changesets/cli": "2.25.2",
"@storybook/addon-essentials": "7.0.0-alpha.47",
Expand All @@ -36,6 +36,7 @@
"@typescript-eslint/eslint-plugin": "5.42.0",
"@typescript-eslint/parser": "5.42.0",
"concurrently": "7.5.0",
"css-loader": "6.7.1",
"eslint": "8.26.0",
"eslint-plugin-react": "7.31.10",
"eslint-plugin-react-hooks": "4.6.0",
Expand All @@ -44,6 +45,8 @@
"husky": "8.0.1",
"lint-staged": "13.0.3",
"next-themes": "0.2.1",
"postcss": "8.4.18",
"postcss-loader": "7.0.1",
"prettier": "2.7.1",
"prettier-plugin-tailwindcss": "0.1.13",
"pretty-quick": "3.1.3",
Expand All @@ -53,17 +56,13 @@
"storybook-addon-next": "1.6.9",
"storybook-addon-swc": "1.1.9",
"storybook-dark-mode": "1.1.2",
"style-loader": "3.3.1",
"tailwindcss": "3.2.1",
"tsconfig-paths-webpack-plugin": "4.0.0",
"tsup": "6.3.0",
"turbo": "1.6.2",
"typescript": "4.8.4"
},
"workspaces": {
"packages": [
"packages/*",
"website"
]
},
"browserslist": [
"> 1%"
],
Expand All @@ -76,15 +75,10 @@
"*.{js,mjs,cjs,ts,tsx,md,json,yml,yaml}": [
"pretty-quick --staged",
"eslint"
],
"yarn.lock": [
"npx yarn-deduplicate"
]
},
"engines": {
"node": ">=16"
},
"resolutions": {
"@mdx-js/react": "2.1.5"
}
"packageManager": "[email protected]"
}
12 changes: 8 additions & 4 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
"@algolia/autocomplete-plugin-query-suggestions": "1.7.2",
"@algolia/autocomplete-theme-classic": "1.7.2",
"@giscus/react": "2.2.0",
"@next/bundle-analyzer": "^12.3.1",
"@headlessui/react": "^1.7.3",
"@next/bundle-analyzer": "12.3.2",
"@radix-ui/react-navigation-menu": "1.1.1",
"algoliasearch": "4.14.2",
"clsx": "1.2.1",
Expand All @@ -76,17 +77,20 @@
"react-player": "2.11.0",
"remark-mdx-disable-explicit-jsx": "0.1.0",
"search-insights": "2.2.1",
"unist-util-visit": "^4.1.1",
"semver": "^7.3.8",
"unist-util-visit": "4.1.1",
"use-debounce": "8.0.4"
},
"devDependencies": {
"@theguild/algolia": "1.0.1",
"@theguild/algolia": "workspace:*",
"@types/dedent": "0.7.0",
"@types/mermaid": "9.1.0",
"@types/react-dom": "18.0.8",
"@types/semver": "7.3.13",
"dedent": "0.7.0",
"next": "12.3.2",
"react": "18.2.0",
"react-dom": "18.2.0"
"react-dom": "18.2.0",
"tailwindcss": "3.2.1"
}
}
7 changes: 3 additions & 4 deletions packages/components/src/define-config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { PRODUCTS, ProductType } from './products';

export function defineConfig({ siteName, ...config }: DocsThemeConfig & { siteName: string }): DocsThemeConfig {
if (!siteName) {
throw new Error(`Missing required "siteName" property`);
throw new Error('Missing required "siteName" property');
}
if (!config.docsRepositoryBase) {
throw new Error(`Missing required "docsRepositoryBase" property`);
throw new Error('Missing required "docsRepositoryBase" property');
}

const url = new URL(config.docsRepositoryBase as string);
Expand Down Expand Up @@ -53,12 +53,11 @@ export function defineConfig({ siteName, ...config }: DocsThemeConfig & { siteNa
</div>
</>
),
...config,
// remove chat option when https://github.com/shuding/nextra/pull/947 will be merged
chat: {
icon: null,
...config.chat,
},
...config,
components: {
...mdxComponents,
...config.components,
Expand Down
4 changes: 2 additions & 2 deletions packages/monaco-graphql-editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ This library was developed as part of the [Schema Prototyper Grant](https://foru

Start by installing the package from NPM:

```
yarn add monaco-editor @monaco-editor/react @theguild/editor
```sh
pnpm add monaco-editor @monaco-editor/react @theguild/editor
```

## `SchemaEditor`
Expand Down
Loading

1 comment on commit 556feba

@vercel
Copy link

@vercel vercel bot commented on 556feba Nov 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.