This commit is contained in:
Felicio Mununga 2024-10-29 10:53:49 +01:00
parent 3c968a2bb2
commit fb66770831
No known key found for this signature in database
GPG Key ID: B8A18D62FCD9EA6E
23 changed files with 25644 additions and 20342 deletions

View File

@ -24,23 +24,28 @@ jobs:
with:
fetch-depth: 2
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.12.3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
cache: 'pnpm'
- name: Install dependencies
run: yarn --frozen-lockfile
run: pnpm --frozen-lockfile
- name: Build
run: yarn build
run: pnpm build
- name: Typecheck
run: yarn typecheck
run: pnpm typecheck
- name: Lint
run: yarn lint && yarn format --check
run: pnpm lint && pnpm format --check
- name: Test
run: yarn test
run: pnpm test

View File

@ -21,18 +21,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
with:
version: 9.12.3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: yarn install --frozen-lockfile
- run: yarn build
- run: pnpm install --frozen-lockfile
- run: pnpm build
- uses: changesets/action@v1
id: changesets
with:
title: Release
commit: Release
version: yarn changeset version
publish: yarn changeset publish
version: pnpm changeset version
publish: pnpm changeset publish
createGithubReleases: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx lint-staged
pnpm lint-staged

2
.npmignore Normal file
View File

@ -0,0 +1,2 @@
!.npmrc
#!pnpm-lock.yaml

7
.npmrc Normal file
View File

@ -0,0 +1,7 @@
; https://pnpm.io/cli/run#enable-pre-post-scripts
enable-pre-post-scripts=true
; https://pnpm.io/npmrc#node-linker
; node-linker=hoisted
; https://pnpm.io/npmrc#shamefully-hoist
;shamefully-hoist=true
;auto-install-peers=true

View File

@ -1,6 +1,6 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"npm.packageManager": "yarn",
"npm.packageManager": "pnpm",
"eslint.workingDirectories": [
{
"mode": "auto",

View File

@ -25,7 +25,7 @@ This monorepo contains packages for building web applications in the Status ecos
Required:
- **[Node.js](https://nodejs.org/)** v18.x
- **[Yarn](https://yarnpkg.com/)** v1.22.x
- **[pnpm](https://pnpm.io)** v9.12.x
Recommended:
@ -57,24 +57,24 @@ Recommended:
2. Install dependencies:
```
yarn install
pnpm install
```
3. Build all packages:
```
yarn build
pnpm build
```
4. Run tests:
```
yarn test
pnpm test
```
5. Start development mode:
```
yarn dev
pnpm dev
```
## Storybook
@ -82,7 +82,7 @@ Recommended:
To view and interact with the components, you can run Storybook:
```
yarn storybook
pnpm storybook
```
This will start the Storybook server, allowing you to browse and test components in isolation.

View File

@ -48,7 +48,7 @@ pipeline {
dir("${env.WORKSPACE}/apps/connector") {
script {
nix.shell(
'yarn install --frozen-lockfile',
'pnpm install --frozen-lockfile',
pure: false,
entryPoint: "${env.WORKSPACE}/apps/connector/shell.nix"
)
@ -65,7 +65,7 @@ pipeline {
dir("${env.WORKSPACE}/apps/connector") {
script {
nix.shell(
'yarn build:chrome',
'pnpm build:chrome',
pure: false,
entryPoint: "${env.WORKSPACE}/apps/connector/shell.nix"
)
@ -121,15 +121,15 @@ pipeline {
success {
script {
if(changesDetected) {
github.notifyPR(true)
}
github.notifyPR(true)
}
}
}
failure {
script {
if(changesDetected) {
github.notifyPR(false)
}
github.notifyPR(false)
}
}
}
cleanup { cleanWs() }

View File

@ -20,13 +20,13 @@ Tested with these browsers:
#### Develop
```bash
yarn dev:chrome
pnpm dev:chrome
```
#### Build
```bash
yarn build:chrome
pnpm build:chrome
```
#### Load
@ -42,7 +42,7 @@ Google Chrome > Window > Extensions > Load unpacked > select build (build/chrome
#### Develop
```bash
yarn dev:safari
pnpm dev:safari
```
#### Convert
@ -70,13 +70,13 @@ Safari > Settings... > Extensions > check Status
#### Develop
```bash
yarn dev:firefox
pnpm dev:firefox
```
#### Build
```bash
yarn build:firefox
pnpm build:firefox
```
#### Load

View File

@ -9,6 +9,7 @@
"directory": "apps/connector"
},
"scripts": {
"preinstall": "npx only-allow pnpm",
"dev:chrome": "plasmo dev --target=chrome-mv3",
"dev:safari": "plasmo dev --target=safari-mv3",
"dev:firefox": "plasmo dev --target=firefox-mv3",

View File

@ -11,6 +11,6 @@ pkgs.mkShell {
buildInputs = with pkgs; [
nodejs_20
yarn
pnpm
];
}

File diff suppressed because it is too large Load Diff

View File

@ -12,6 +12,7 @@
},
"keywords": [],
"scripts": {
"preinstall": "npx only-allow pnpm",
"postinstall": "patch-package",
"prepare": "husky install",
"test": "turbo run test --filter=@status-im/* -- --run",
@ -21,7 +22,7 @@
"typecheck": "turbo run typecheck",
"format": "prettier --ignore-path .gitignore --write .",
"clean": "turbo run clean && rimraf node_modules",
"storybook": "yarn workspace @status-im/components storybook"
"storybook": "pnpm --workspace @status-im/components storybook"
},
"resolutions": {
"@types/react": "18.0.33",
@ -29,7 +30,7 @@
},
"devDependencies": {
"@changesets/cli": "^2.26.2",
"@status-im/eslint-config": "*",
"@status-im/eslint-config": "workspace:*",
"@tsconfig/strictest": "^2.0.0",
"@types/prettier": "^2.7.2",
"husky": "^8.0.3",
@ -44,7 +45,14 @@
"vite-node": "^0.29.8",
"vitest": "^0.29.8"
},
"packageManager": "yarn@1.22.17",
"packageManager": "pnpm@9.12.3",
"pnpm": {
"patchedDependencies": {
"@achingbrain/ssdp@4.0.1": "patches/@achingbrain__ssdp@4.0.1.patch",
"@libp2p/bootstrap@9.0.10": "patches/@libp2p+bootstrap+9.0.10.patch",
"it-length-prefixed@9.0.3": "patches/it-length-prefixed+9.0.3.patch"
}
},
"lint-staged": {
"*.{md,mdx,yml,yaml,json}": [
"prettier --write"

View File

@ -20,24 +20,25 @@
"./package.json": "./package.json"
},
"scripts": {
"preinstall": "npx only-allow pnpm",
"sync": "rimraf src && vite-node scripts/sync.ts",
"dev": "vite build --watch --mode development",
"build:types": "tsc --noEmit false --emitDeclarationOnly",
"build": "vite build",
"postbuild": "yarn build:types",
"postbuild": "pnpm build:types",
"#test": "vitest",
"typecheck": "tsc",
"lint": "eslint src",
"lint:fix": "yarn lint --fix",
"lint:fix": "pnpm lint --fix",
"format": "prettier --write src",
"clean": "rimraf dist node_modules .turbo",
"prepack": "yarn build"
"prepack": "pnpm build"
},
"peerDependencies": {},
"devDependencies": {
"@clack/prompts": "^0.6.3",
"colorjs.io": "^0.4.3",
"@status-im/eslint-config": "*",
"@status-im/eslint-config": "workspace:*",
"figma-api": "^1.11.0",
"fs-extra": "^11.1.1",
"vite": "^5.4.3",

View File

@ -25,9 +25,10 @@
"dist"
],
"scripts": {
"preinstall": "npx only-allow pnpm",
"dev": "vite build --watch --mode development",
"build": "vite build",
"postbuild": "yarn build:types",
"postbuild": "pnpm build:types",
"build:types": "tsc --noEmit false --emitDeclarationOnly",
"typecheck": "tsc",
"lint": "eslint src",
@ -36,7 +37,7 @@
"storybook:dev": "storybook dev -p 3001",
"storybook:build": "storybook build",
"clean": "rimraf node_modules dist .turbo storybook-static",
"prepack": "yarn build"
"prepack": "pnpm build"
},
"peerDependencies": {
"react": "^18.2.0"
@ -52,8 +53,8 @@
"@radix-ui/react-toast": "^1.2.1",
"@radix-ui/react-toggle-group": "^1.1.0",
"@radix-ui/react-tooltip": "^1.1.2",
"@status-im/colors": "*",
"@status-im/icons": "*",
"@status-im/colors": "workspace:*",
"@status-im/icons": "workspace:*",
"cva": "^1.0.0-beta.1",
"date-fns": "^2.30.0",
"react-aria-components": "^1.3.3",
@ -62,7 +63,7 @@
"zustand": "^4.3.7"
},
"devDependencies": {
"@status-im/eslint-config": "*",
"@status-im/eslint-config": "workspace:*",
"@storybook/addon-designs": "^8.0.3",
"@storybook/addon-essentials": "^8.3.0",
"@storybook/addon-interactions": "^8.3.0",

View File

@ -7,7 +7,7 @@
const child_process = require('node:child_process')
const process = require('node:process')
const subprocess = child_process.spawn('yarn', ['storybook:dev', '--no-open'], {
const subprocess = child_process.spawn('pnpm', ['storybook:dev', '--no-open'], {
detached: true,
stdio: 'inherit',
})

View File

@ -1,6 +1,6 @@
{
"$schema": "https://openapi.vercel.sh/vercel.json",
"ignoreCommand": "git diff --quiet HEAD^ HEAD ../../{patches,package.json,turbo.json} ../../packages/{colors,icons} ./",
"installCommand": "yarn install --cwd ../../ --frozen-lockfile",
"buildCommand": "turbo run build --cwd ../../ --filter=components... && yarn storybook:build"
"installCommand": "pnpm install --dir ../../ --frozen-lockfile",
"buildCommand": "turbo run build --cwd ../../ --filter=components... && pnpm storybook:build"
}

View File

@ -11,6 +11,7 @@
"./package.json": "./package.json"
},
"scripts": {
"preinstall": "npx only-allow pnpm",
"clean": "rimraf node_modules"
},
"dependencies": {

View File

@ -54,19 +54,20 @@
}
},
"scripts": {
"preinstall": "npx only-allow pnpm",
"sync": "vite-node scripts/sync.ts && prettier --parser=html --write 'svg/**/*.svg'",
"generate": "rimraf src && svgr svg --out-dir src && yarn lint:fix && yarn format",
"generate": "rimraf src && svgr svg --out-dir src && pnpm lint:fix && pnpm format",
"dev": "vite build --watch --mode development",
"build": "vite build",
"postbuild": "yarn build:types",
"postbuild": "pnpm build:types",
"build:types": "tsc src/**/index.ts --emitDeclarationOnly --declaration --jsx react-jsx --skipLibCheck --declarationDir ./dist",
"#test": "vitest",
"typecheck": "tsc",
"lint": "eslint 'src/**/*.{ts,tsx}'",
"lint:fix": "yarn lint --fix",
"lint:fix": "pnpm lint --fix",
"format": "prettier --write 'src/**/*.{ts,tsx}'",
"clean": "rimraf dist node_modules .turbo",
"prepack": "yarn build"
"prepack": "pnpm build"
},
"peerDependencies": {
"react": "^16.x || ^17.x || ^18.x",
@ -74,7 +75,7 @@
},
"devDependencies": {
"@clack/prompts": "^0.7.0",
"@status-im/eslint-config": "*",
"@status-im/eslint-config": "workspace:*",
"@svgr/cli": "^8.1.0",
"@svgr/core": "^8.1.0",
"@svgr/plugin-prettier": "^8.1.0",

View File

@ -34,10 +34,11 @@
"url": "https://github.com/status-im/status-web/issues"
},
"scripts": {
"preinstall": "npx only-allow pnpm",
"test": "vitest",
"dev": "vite build --watch --mode development",
"build": "vite build",
"postbuild": "yarn build:types",
"postbuild": "pnpm build:types",
"build:types": "tsc --noEmit false --emitDeclarationOnly || true",
"lint": "eslint src",
"typecheck": "tsc",
@ -60,7 +61,7 @@
},
"devDependencies": {
"@bufbuild/protoc-gen-es": "1.4.2",
"@status-im/eslint-config": "*",
"@status-im/eslint-config": "workspace:*",
"@waku/interfaces": "^0.0.21",
"happy-dom": "^9.1.7"
},

25554
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load Diff

7
pnpm-workspace.yaml Normal file
View File

@ -0,0 +1,7 @@
packages:
- 'packages/eslint-config'
- 'packages/status-js'
- 'packages/colors'
- 'packages/icons'
- 'packages/components'
- 'apps/*'

12570
yarn.lock

File diff suppressed because it is too large Load Diff