Skip to content

Commit

Permalink
Next++ (#174)
Browse files Browse the repository at this point in the history
* force

* force

* feat(signal/server-context): ServerContext

* feat(signal/server-context): ServerContext

* release: %s

 - @gecut/[email protected]

* feat(workflows): rewrite with bun

* feat(workflows): rewrite with bun

* fix(utilities/debounce): change types
  • Loading branch information
MM25Zamanian authored Oct 24, 2024
1 parent 913f9b0 commit be154a4
Show file tree
Hide file tree
Showing 24 changed files with 102 additions and 8,655 deletions.
38 changes: 10 additions & 28 deletions .github/workflows/build-lint.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json

name: Build & Lint
name: Build & Lint (Bun FTW! )

on:
workflow_dispatch:
Expand All @@ -17,7 +17,7 @@ env:

jobs:
build-lint-ts:
name: Build & Lint Typescript
name: Build & Lint Typescript (Bun Style )
runs-on: ubuntu-latest

permissions:
Expand All @@ -27,32 +27,14 @@ jobs:
- name: ⤵️ Checkout repository
uses: actions/[email protected]

- name: 🏗 Setup nodejs
uses: actions/[email protected]
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install Bun
uses: oven-sh/setup-bun@v1 # Install Bun for our workflow

- name: 🏗 Setup nodejs corepack
run: corepack enable
- name: Install dependencies
run: bun install # Use Bun's package manager

- name: 🏗 Get yarn config
id: yarn_config
run: echo "cache_folder=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- name: Build Typescript
run: bun run build # Leverage Bun's built-in build functionality

- name: 🏗 Cache Layer
uses: actions/[email protected]
# id: yarn_cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn_config.outputs.cache_folder }}
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: 🏗 Install dependencies
run: yarn install --immutable

- name: 🚀 Build Typescript
run: yarn build

- name: 🚀 Run ESLint
run: yarn lint
- name: Run ESLint
run: bun run lint # Execute ESLint using Bun's task runner (if applicable)
43 changes: 13 additions & 30 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json

name: Publish NPM
name: Publish with Bun

on:
workflow_dispatch:
Expand All @@ -13,8 +13,8 @@ env:
NODE_VERSION: lts/*

jobs:
publish-npm:
name: Publish NPM
publish-with-bun:
name: Publish with Bun
runs-on: ubuntu-latest

permissions:
Expand All @@ -24,38 +24,21 @@ jobs:
- name: ⤵️ Checkout repository
uses: actions/[email protected]

- name: 🏗 Setup nodejs
- name: Setup Node.js (for Bun)
uses: actions/[email protected]
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'

- name: 🏗 Setup nodejs corepack
run: corepack enable
- name: Install Bun
uses: oven-sh/setup-bun@v1

- name: 🏗 Get yarn config
id: yarn_config
run: echo "cache_folder=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- name: Install dependencies (Bun)
run: bun install --frozen

- name: 🏗 Cache Layer
uses: actions/[email protected]
# id: yarn_cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn_config.outputs.cache_folder }}
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: 🏗 Install dependencies
run: yarn install --immutable

- name: 🏗 Build Typescript
run: yarn build

# - name: 🚀 Extra Packages Build
# run: yarn build:r
- name: Build Typescript
run: bun run build

- name: 🚀 Publish
run: yarn run publish --yes
- name: Publish (with Bun)
run: bun run publish --yes
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
9 changes: 0 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@ Desktop.ini
# Logs
*.log*

# package managers
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
#!.yarn/cache
.pnp.*
node_modules
package-lock.json

Expand Down
37 changes: 0 additions & 37 deletions .prettierignore

This file was deleted.

10 changes: 2 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"npm.packageManager": "yarn",
"npm.packageManager": "bun",
"editor.wordWrapColumn": 120,
"editor.formatOnPaste": false,
"editor.formatOnSave": false,
Expand All @@ -23,15 +23,9 @@
"markdownlint.ignore": ["**/CHANGELOG.md"],
"cSpell.language": "en,fa,fa-IR",
"cSpell.words": ["Alwatr", "Gecut"],
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"git.autoStash": true,
"git.branchProtection": ["main", "next"],
"githubPullRequests.ignoredPullRequestBranches": ["main", "next"],
"search.exclude": {
"**/.yarn": true,
"**/.pnp.*": true
},
"eslint.nodePath": ".yarn/sdks",
"prettier.prettierPath": ".yarn/sdks/prettier/index.cjs",
"typescript.enablePromptUseWorkspaceTsdk": true
}
}
925 changes: 0 additions & 925 deletions .yarn/releases/yarn-4.4.1.cjs

This file was deleted.

23 changes: 0 additions & 23 deletions .yarn/sdks/eslint/package.json

This file was deleted.

5 changes: 0 additions & 5 deletions .yarn/sdks/integrations.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .yarn/sdks/prettier/bin/prettier.cjs

This file was deleted.

32 changes: 0 additions & 32 deletions .yarn/sdks/prettier/index.cjs

This file was deleted.

7 changes: 0 additions & 7 deletions .yarn/sdks/prettier/package.json

This file was deleted.

32 changes: 0 additions & 32 deletions .yarn/sdks/typescript/bin/tsc

This file was deleted.

32 changes: 0 additions & 32 deletions .yarn/sdks/typescript/bin/tsserver

This file was deleted.

10 changes: 0 additions & 10 deletions .yarn/sdks/typescript/package.json

This file was deleted.

1 change: 0 additions & 1 deletion .yarnrc.yml

This file was deleted.

Binary file added bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://unpkg.com/[email protected]/schemas/lerna-schema.json",
"version": "independent",
"npmClient": "yarn",
"npmClient": "bun",
"packages": ["packages/*", "demo"],
"loglevel": "verbose",
"command": {
Expand Down
Loading

0 comments on commit be154a4

Please sign in to comment.