Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Davidesegullo/fix projectroot #125

Merged
merged 7 commits into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,43 +18,45 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch the entire history to allow proper versioning
fetch-depth: 0 # Fetch the entire history to allow proper versioning

# Step 2: Set up bun package manager
- name: Install bun
uses: oven-sh/setup-bun@v1
# Step 2: Setup pnpm package manager
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
bun-version: latest
version: 9
run_install: false

# Step 3: Set up Node.js environment
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: Cache dependencies
uses: actions/cache@v4
with:
path: "**/node_modules"
path: '**/node_modules'
key: ${{ runner.OS }}-20.x-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-20.x-

# Step 5: Install dependencies
- name: Install dependencies
run: bun i --frozen-lockfile
run: pnpm i --frozen-lockfile

# Step 6: Set SHAs for nx workspace
- name: Set SHAs for Nx workspace
uses: nrwl/nx-set-shas@v4

# Step 7: Run the build for the affected changes
- name: Run Nx lint, test and build
run: bunx nx affected -t lint test build --exclude nextjs,vue3
run: pnpx nx affected -t lint test build --exclude nextjs,vue3

# Step 8: Run the release in dry-run mode
- name: Run Nx release version (dry-run)
run: bun run tools/scripts/release.ts
run: pnpm release

# Step 9: Run publish in dry-run mode
- name: Publish
Expand All @@ -64,14 +66,14 @@ jobs:
# Use npx instead of yarn because yarn automagically sets NPM_* environment variables
# like NPM_CONFIG_REGISTRY so npm publish ends up ignoring the .npmrc file
# which is set up by `setup-node` action.
run: npx nx release publish --verbose --dry-run
run: pnpx nx release publish --verbose --dry-run

# Step 10: Upload artifacts
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
path: "./dist"
path: './dist'

# Step 11: Clean up dist directory
- name: Cleanup dist directory
run: rm -rf ./dist # Remove the dist directory to start fresh
run: rm -rf ./dist # Remove the dist directory to start fresh
24 changes: 13 additions & 11 deletions .github/workflows/release-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,48 +23,50 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch the entire history to allow proper versioning
fetch-depth: 0 # Fetch the entire history to allow proper versioning

# Step 2: Set up bun package manager
- name: Install bun
uses: oven-sh/setup-bun@v1
# Step 2: Setup pnpm package manager
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
bun-version: latest
version: 9
run_install: false

# Step 3: Set up Node.js environment
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'

- name: Cache dependencies
uses: actions/cache@v4
with:
path: "**/node_modules"
path: '**/node_modules'
key: ${{ runner.OS }}-20.x-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-20.x-

# Step 5: Install dependencies
- name: Install dependencies
run: bun i --frozen-lockfile
run: pnpm i --frozen-lockfile

# Step 6: Set SHAs for nx workspace
- name: Set SHAs for Nx workspace
uses: nrwl/nx-set-shas@v4

# Step 7: Run the build for the affected changes
- name: Run Nx lint, test and build
run: bunx nx affected -t lint test build --exclude nextjs,vue3
run: pnpx nx affected -t lint test build --exclude nextjs,vue3

# Step 8: Set github authour
- name: Setup git user to "🤖 nabla bot"
run: git config user.email "-" && git config user.name "🤖 nabla bot"

# Step 9: Run the release
- name: Run Nx release version
run: bun run tools/scripts/release.ts -d false
run: pnpm release -d false

# Step 10: Run publish
- name: Publish
Expand All @@ -78,4 +80,4 @@ jobs:

# Step 11: Clean up dist directory
- name: Cleanup dist directory
run: rm -rf ./dist # Remove the dist directory to start fresh
run: rm -rf ./dist # Remove the dist directory to start fresh
26 changes: 14 additions & 12 deletions .github/workflows/release-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,48 +21,50 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch the entire history to allow proper versioning
fetch-depth: 0 # Fetch the entire history to allow proper versioning

# Step 2: Set up bun package manager
- name: Install bun
uses: oven-sh/setup-bun@v1
# Step 2: Setup pnpm package manager
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
bun-version: latest
version: 9
run_install: false

# Step 3: Set up Node.js environment
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'

- name: Cache dependencies
uses: actions/cache@v4
with:
path: "**/node_modules"
path: '**/node_modules'
key: ${{ runner.OS }}-20.x-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-20.x-

# Step 5: Install dependencies
- name: Install dependencies
run: bun i --frozen-lockfile
run: pnpm i --frozen-lockfile

# Step 6: Set SHAs for nx workspace
- name: Set SHAs for Nx workspace
uses: nrwl/nx-set-shas@v4

# Step 7: Run the build for the affected changes
- name: Run Nx lint, test and build
run: bunx nx affected -t lint test build --exclude nextjs,vue3
run: pnpx nx affected -t lint test build --exclude nextjs,vue3

# Step 8: Set github authour
- name: Setup git user to "🤖 nabla bot"
run: git config user.email "-" && git config user.name "🤖 nabla bot"

# Step 9: Run the release
- name: Run Nx release version
run: bun run tools/scripts/release.ts -d false
run: pnpm release -d false

# Step 10: Run publish
- name: Publish
Expand All @@ -72,8 +74,8 @@ jobs:
# Use npx instead of yarn because yarn automagically sets NPM_* environment variables
# like NPM_CONFIG_REGISTRY so npm publish ends up ignoring the .npmrc file
# which is set up by `setup-node` action.
run: npx nx release publish --verbose
run: pnpx nx release publish --verbose

# Step 11: Clean up dist directory
- name: Cleanup dist directory
run: rm -rf ./dist # Remove the dist directory to start fresh
run: rm -rf ./dist # Remove the dist directory to start fresh
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ git submodule init

```bash
cd quirks
bun i
pnpm i
```

4. Build the packages:

```bash
bun run build
pnpm build
```

### Understand this workspace
Expand Down
Binary file removed bun.lockb
Binary file not shown.
8 changes: 0 additions & 8 deletions bunfig.toml

This file was deleted.

5 changes: 5 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
],
"sharedGlobals": []
},
"pluginsConfig": {
"@nx/js": {
"analyzeSourceFiles": true
}
},
"generators": {
"@nx/react": {
"application": {
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "quirks",
"version": "0.1.1-next.0",
"name": "@quirks/source",
"version": "0.1.0",
"license": "MIT",
"scripts": {
"build": "nx run-many --target=build --exclude nextjs,vue3 --parallel=6",
"test": "nx run-many --target=test --exclude nextjs,vue3 --parallel=6",
"lint": "nx run-many --target=lint --exclude nextjs,vue3 --parallel=6",
"release": "node tools/scripts/release.js",
"prepare": "husky install"
},
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@walletconnect/types": "^2.11.2",
"base64-js": "^1.5.1",
"pino-pretty": "^10.2.3",
"@nabla-studio/wallet-registry": "0.6.1-next.4"
"@nabla-studio/wallet-registry": "workspace:*"
},
"main": "./index.js",
"module": "./index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"cookies-next": "^4.2.1",
"superjson": "^2.2.1",
"zustand": "^4.5.0",
"@quirks/store": "0.27.2-next.4"
"@quirks/store": "workspace:*"
},
"peerDependencies": {
"next": "^13"
Expand Down
4 changes: 2 additions & 2 deletions packages/nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"sideEffects": false,
"type": "module",
"dependencies": {
"@quirks/vue": "0.12.7-next.0",
"@quirks/store": "0.27.2-next.0"
"@quirks/vue": "workspace:*",
"@quirks/store": "workspace:*"
},
"peerDependencies": {
"nuxt": "^3.8.1",
Expand Down
10 changes: 1 addition & 9 deletions packages/react-native/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# react-native

This library was generated with [Nx](https://nx.dev).

## Building

Run `nx build react-native` to build the library.

## Running unit tests

Run `nx test react-native` to execute the unit tests via [Jest](https://jestjs.io).
This library is a set of utility for react native.
4 changes: 2 additions & 2 deletions packages/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"sideEffects": false,
"type": "module",
"dependencies": {
"@quirks/store": "0.27.2-next.4",
"@quirks/core": "0.19.1-next.4",
"@quirks/store": "workspace:*",
"@quirks/core": "workspace:*",
"babel-plugin-module-resolver": "^5.0.0",
"@craftzdog/react-native-buffer": "^6.0.5",
"react-native-get-random-values": "^1.10.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"sideEffects": false,
"type": "module",
"dependencies": {
"@quirks/store": "0.27.2-next.4",
"@quirks/core": "0.19.1-next.4",
"@quirks/store": "workspace:*",
"@quirks/core": "workspace:*",
"cosmjs-types": "^0.9.0",
"@cosmjs/amino": "^0.32.2",
"eventemitter3": "^5.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@cosmjs/cosmwasm-stargate": "^0.32.2",
"@walletconnect/universal-provider": "^2.11.2",
"cosmjs-types": "^0.9.0",
"@quirks/core": "0.19.1-next.4"
"@quirks/core": "workspace:*"
},
"main": "./index.js",
"module": "./index.js",
Expand Down
3 changes: 2 additions & 1 deletion packages/vue/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"zustand",
"@cosmjs/stargate",
"@cosmjs/cosmwasm-stargate",
"@walletconnect/universal-provider"
"@walletconnect/universal-provider",
"eventemitter3"
],
"ignoredFiles": ["{projectRoot}/vite.config.{js,ts,mjs,mts,vue}"]
}
Expand Down
4 changes: 2 additions & 2 deletions packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"sideEffects": false,
"type": "module",
"dependencies": {
"@quirks/store": "0.27.2-next.4",
"@quirks/core": "0.19.1-next.4",
"@quirks/store": "workspace:*",
"@quirks/core": "workspace:*",
"vue-zustand": "^0.6.0",
"eventemitter3": "^5.0.1",
"zustand": "^4.5.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/wallets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"dependencies": {
"@chain-registry/keplr": "^1.74.12",
"@chain-registry/types": "^0.50.1",
"@quirks/core": "0.19.1-next.4",
"@nabla-studio/wallet-registry": "0.6.1-next.4",
"@quirks/core": "workspace:*",
"@nabla-studio/wallet-registry": "workspace:*",
"@keplr-wallet/types": "^0.12.86",
"@cosmostation/extension-client": "^0.1.15",
"@dao-dao/cosmiframe": "^0.1.0",
Expand Down
Loading