Skip to content

Commit 9548897

Browse files
committed
testing bun + fix for plexus react
1 parent b765010 commit 9548897

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+147
-80
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,18 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v3
11+
- uses: oven-sh/setup-bun@v1
12+
with:
13+
bun-version: latest
1114
- uses: actions/setup-node@v3
1215
with:
1316
node-version: 18
1417

15-
- name: Cache node modules
18+
- name: 💾 Fetch Cache
1619
id: cache-yarn
1720
uses: actions/cache@v3
1821
env:
19-
cache-name: cache-node-module
22+
cache-name: cache-node-modules
2023
with:
2124
path: |
2225
~/.cache/yarn
@@ -28,4 +31,4 @@ jobs:
2831
name: 📦 Install Dependencies
2932
env:
3033
NO_YARN_POSTINSTALL: 1
31-
run: yarn install --frozen-lockfile
34+
run: bun install --frozen-lockfile

.github/workflows/npm-publish-canary.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ jobs:
1919
packages: write
2020
steps:
2121
- uses: actions/checkout@v3
22+
- uses: oven-sh/setup-bun@v1
23+
with:
24+
bun-version: latest
2225
- uses: actions/setup-node@v3
2326
with:
2427
node-version: 16
@@ -27,7 +30,7 @@ jobs:
2730
id: cache-yarn
2831
uses: actions/cache@v3
2932
env:
30-
cache-name: cache-node-module
33+
cache-name: cache-node-modules
3134
with:
3235
path: |
3336
~/.cache/yarn

.github/workflows/npm-publish-stable.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- uses: actions/checkout@v3
26+
- uses: oven-sh/setup-bun@v1
27+
with:
28+
bun-version: latest
2629
- uses: actions/setup-node@v3
2730
with:
2831
node-version: 18
@@ -35,7 +38,7 @@ jobs:
3538
id: cache-yarn
3639
uses: actions/cache@v3
3740
env:
38-
cache-name: cache-node-module
41+
cache-name: cache-node-modules
3942
with:
4043
path: |
4144
~/.cache/yarn
@@ -55,11 +58,14 @@ jobs:
5558
runs-on: ubuntu-latest
5659
steps:
5760
- uses: actions/checkout@v3
61+
- uses: oven-sh/setup-bun@v1
62+
with:
63+
bun-version: latest
5864
- name: 💾 Fetch Cache
5965
id: cache-yarn
6066
uses: actions/cache@v3
6167
env:
62-
cache-name: cache-node-module
68+
cache-name: cache-node-modules
6369
with:
6470
path: |
6571
~/.cache/yarn
@@ -83,11 +89,14 @@ jobs:
8389
packages: write
8490
steps:
8591
- uses: actions/checkout@v3
92+
- uses: oven-sh/setup-bun@v1
93+
with:
94+
bun-version: latest
8695
- name: 💾 Fetch Cache
8796
id: cache-yarn
8897
uses: actions/cache@v3
8998
env:
90-
cache-name: cache-node-module
99+
cache-name: cache-node-modules
91100
with:
92101
path: |
93102
~/.cache/yarn

.github/workflows/tests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,17 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v3
15+
- uses: oven-sh/setup-bun@v1
16+
with:
17+
bun-version: latest
1518
- uses: actions/setup-node@v3
1619
with:
1720
node-version: 18
1821
- name: Cache node modules
1922
id: cache-yarn
2023
uses: actions/cache@v2
2124
env:
22-
cache-name: cache-node-module
25+
cache-name: cache-node-modules
2326
with:
2427
path: |
2528
~/.cache/yarn

.github/workflows/trunk-nightly.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,15 @@ jobs:
1616
steps:
1717
- name: Checkout
1818
uses: actions/checkout@v3
19+
- uses: oven-sh/setup-bun@v1
20+
with:
21+
bun-version: latest
1922

2023
- name: Cache node modules
2124
id: cache-yarn
2225
uses: actions/cache@v3
2326
env:
24-
cache-name: cache-node-module
27+
cache-name: cache-node-modules
2528
with:
2629
path: |
2730
~/.cache/yarn

.github/workflows/trunk-pr.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,15 @@ jobs:
1111
steps:
1212
- name: Checkout
1313
uses: actions/checkout@v3
14+
- uses: oven-sh/setup-bun@v1
15+
with:
16+
bun-version: latest
1417

1518
- name: Cache node modules
1619
id: cache-yarn
1720
uses: actions/cache@v3
1821
env:
19-
cache-name: cache-node-module
22+
cache-name: cache-node-modules
2023
with:
2124
path: |
2225
~/.cache/yarn

bun.lockb

734 KB
Binary file not shown.

cli/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
"scripts": {
1111
"precli:build": "rm -rf ./out/bin.js",
1212
"build": "rollup --config ./rollup.config.js",
13-
"postbuild": "node ./lib/postbuild.js",
14-
"preexecute": "yarn build",
15-
"execute": "npx .",
16-
"prepublish": "yarn build",
13+
"postbuild": "bun ./lib/postbuild.js",
14+
"preexecute": "bun build",
15+
"execute": "bunx .",
16+
"prepublish": "bun build",
1717
"publish-stable": "yarn publish",
18-
"local-install": "yarn build && npm link"
18+
"local-install": "bun build && npm link"
1919
},
2020
"repository": {
2121
"type": "git",

cli/src/main.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ const helpString = `
2323
2424
Options:
2525
--yarn Use Yarn as the package manager
26+
--bun Use Bun as the package manager
2627
--canary Use the canary version of plexus
27-
--dev Use the dev version of plexus
28-
--skip-install Skip the install of the PlexusJS packages
29-
--typescript Create TypeScript files
28+
--dev Use the dev version of plexus
29+
--skip-install Skip the install of the PlexusJS packages
30+
--typescript Create TypeScript files
3031
--react Install the React package
3132
--next Install the Next package
3233
--template=<template> Choose the template to use to generate a PlexusJS core

cli/src/update.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ export const installPlexus = (tag = '') => {
6868
if (existsSync(`${__dirname}/yarn.lock`) || yargs.argv.yarn) {
6969
console.log(chalk.cyan.bgWhite(`Using Yarn Package Manager`))
7070
installCommand = 'yarn install'
71+
}
72+
if (existsSync(`${__dirname}/bun.lockb`) || yargs.argv.bun) {
73+
console.log(chalk.black.bgWhite(`Using Bun Package Manager`))
74+
installCommand = 'bun install'
7175
} else {
7276
console.log(chalk.cyan.bgWhite('Using NPM Package Manager'))
7377
}

0 commit comments

Comments
 (0)