Skip to content
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
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
* text eol=lf
*.png binary

yarn.lock -diff
bun.lock -diff
package-lock.json -diff
12 changes: 6 additions & 6 deletions .github/actions/cached-deps/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Get & Cache Dependencies
description: Get dependencies via yarn and cache them
description: Get dependencies via Bun and cache them
inputs:
caching:
description: Whether to cache dependencies or not
Expand All @@ -18,22 +18,22 @@ runs:
uses: actions/cache@v6
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.OS }}-yarn-${{ env.cache-name }}-
${{ runner.OS }}-yarn-
${{ runner.OS }}-bun-${{ env.cache-name }}-
${{ runner.OS }}-bun-
${{ runner.OS }}-

- name: Install
if: steps.cache.outputs.cache-hit != 'true' || inputs.caching != 'true'
id: install
run: |
yarn install --frozen-lockfile
bun ci
echo "cache='${{ inputs.caching }}'" >> $GITHUB_OUTPUT
shell: bash

- name: Postinstall
if: steps.cache.outputs.cache-hit == 'true' && inputs.caching == 'true'
id: postinstall
run: yarn postinstall
run: bun run postinstall
shell: bash
19 changes: 12 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,25 @@ jobs:
node-version: 24
registry-url: 'https://registry.npmjs.org'

- name: 🗜️ Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14

- name: 🛠️ Install
uses: ./.github/actions/cached-deps

- name: 🛠️ Sync versions
run: yarn script:sync-projects
run: bun run script:sync-projects

- name: 🧹 Lint
run: yarn lint
run: bun run lint

- name: ♻️ Check circular dependencies
run: yarn check-circular-dependencies
run: bun run check-circular-dependencies

- name: 🧪 Run tests
run: yarn test --project ngx-nullable --coverage
run: bun run test --project ngx-nullable --coverage

- name: ⬆️ Upload coverage reports
uses: codecov/codecov-action@v4
Expand All @@ -49,10 +54,10 @@ jobs:
dry_run: false

- name: 📦 Build demo app
run: yarn build:demo --base-href https://celtian.github.io/ngx-nullable/
run: bun run build:demo --base-href https://celtian.github.io/ngx-nullable/

- name: 📦 Build ngx-nullable
run: yarn build
run: bun run build

- name: 🚀 Publish NPM
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false
Expand All @@ -68,7 +73,7 @@ jobs:

- name: 🛠️ Set up package for GPR
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false
run: yarn script:gpr-setup
run: bun run script:gpr-setup

- name: 🛠️ Use GPR
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,28 @@ jobs:
node-version: 24
registry-url: 'https://registry.npmjs.org'

- name: 🗜️ Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14

- name: 🛠️ Install
uses: ./.github/actions/cached-deps

- name: 🛠️ Sync versions
run: yarn script:sync-projects
run: bun run script:sync-projects

- name: 🧹 Lint
run: yarn lint
run: bun run lint

- name: ♻️ Check circular dependencies
run: yarn check-circular-dependencies
run: bun run check-circular-dependencies

- name: 🧪 Run tests (ngx-nullable)
run: yarn test ngx-nullable --coverage
run: bun run test ngx-nullable --coverage

- name: 🧪 Run tests (demo)
run: yarn test demo --coverage
run: bun run test demo --coverage

- name: 🧪 Report code coverage
uses: ./.github/actions/report-pr
Expand All @@ -48,7 +53,7 @@ jobs:
dry_run: true

- name: 📦 Build demo app
run: yarn build:demo --base-href https://celtian.github.io/ngx-nullable/
run: bun run build:demo --base-href https://celtian.github.io/ngx-nullable/

- name: 📦 Build ngx-nullable
run: yarn build
run: bun run build
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# Node
/node_modules
npm-debug.log
yarn-error.log

# IDEs and editors
.idea/
Expand Down Expand Up @@ -43,4 +42,4 @@ __screenshots__/
Thumbs.db

# Temporary files
version.ts
version.ts
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npx --no-install commitlint --edit
bunx --no-install commitlint --edit "$1"
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npx lint-staged --relative
bunx --no-install lint-staged --relative
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package.json
package-lock.json
yarn.lock
bun.lock
dist
.angulardoc.json
.vscode/*
Expand Down
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
"name": "ng serve",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: start",
"preLaunchTask": "bun: start",
"url": "http://localhost:4200/"
},
{
"name": "ng test",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: test",
"preLaunchTask": "bun: test",
"url": "http://localhost:9876/debug.html"
}
]
Expand Down
12 changes: 8 additions & 4 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "start",
"label": "bun: start",
"type": "process",
"command": "bun",
"args": ["run", "start"],
"isBackground": true,
"problemMatcher": {
"owner": "typescript",
Expand All @@ -21,8 +23,10 @@
}
},
{
"type": "npm",
"script": "test",
"label": "bun: test",
"type": "process",
"command": "bun",
"args": ["run", "test"],
"isBackground": true,
"problemMatcher": {
"owner": "typescript",
Expand Down
22 changes: 11 additions & 11 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@

## Project Overview

This is an Angular 22 workspace managed with Yarn 1. It contains:
This is an Angular 22 workspace managed with Bun. It contains:

- `projects/ngx-nullable`: the publishable `ngx-nullable` library.
- `projects/demo`: the demo application used to exercise and document the library.
- `scripts`: release and package synchronization utilities.

Use Node.js 24 for development and CI. Use `yarn`, not `npm`, to manage dependencies.
Use Node.js 24 for development and CI. Use Bun 1.3.14 to manage dependencies.

## Common Commands

- `yarn start`: run the demo application locally.
- `yarn build`: build the library in production mode.
- `yarn build:demo`: build the demo application in production mode.
- `yarn lint`: lint both workspace projects.
- `yarn test ngx-nullable`: run the library tests.
- `yarn test demo`: run the demo tests.
- `yarn check-circular-dependencies`: check the library entry points for circular dependencies.
- `bun run start`: run the demo application locally.
- `bun run build`: build the library in production mode.
- `bun run build:demo`: build the demo application in production mode.
- `bun run lint`: lint both workspace projects.
- `bun run test ngx-nullable`: run the library tests.
- `bun run test demo`: run the demo tests.
- `bun run check-circular-dependencies`: check the library entry points for circular dependencies.

Prefer targeted tests while developing. Before completing a source change, run the relevant tests and lint checks. For changes that affect packaging or the public API, also run `yarn build`.
Prefer targeted tests while developing. Before completing a source change, run the relevant tests and lint checks. For changes that affect packaging or the public API, also run `bun run build`.

## Source and API Conventions

- Library implementation belongs in `projects/ngx-nullable/src/lib`.
- Export every intended public symbol from `projects/ngx-nullable/src/public-api.ts`.
- Keep demo-only code in `projects/demo`; do not make the library depend on the demo.
- Treat `projects/demo/src/environments/version.ts` as generated output. It is created by `yarn postinstall`; do not edit or commit it.
- Treat `projects/demo/src/environments/version.ts` as generated output. It is created by `bun run postinstall`; do not edit or commit it.
- `scripts/sync-projects.ts` synchronizes package metadata and the README during releases. Do not run release or publish scripts unless explicitly requested.
- Update the root `README.md` when changing installation, configuration, behavior, or the public API.
- Preserve compatibility with the peer dependency range declared in `projects/ngx-nullable/package.json`.
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ Here's the [demo](http://celtian.github.io/ngx-nullable/)

## 🛠️ Install

1. Use yarn (or npm) to install the package
1. Use Bun to install the package

```terminal
yarn add ngx-nullable
bun add ngx-nullable
```

2. Add `provideNullable` into your config (optional)
Expand Down Expand Up @@ -115,10 +115,10 @@ class Example {

## 🔧 Compatibility

| Angular | ngx-fixed-footer | Install |
| ---------- | ---------------- | ----------------------------- |
| >= 22 | 1.x | `yarn add ngx-fixed-footer` |
| >= 18 < 21 | 0.x | `yarn add ngx-fixed-footer@0` |
| Angular | ngx-nullable | Install |
| ---------- | ------------ | -------------------------- |
| >= 22 | 1.x | `bun add ngx-nullable` |
| >= 18 < 21 | 0.x | `bun add ngx-nullable@0` |

## 📦 Dependencies

Expand Down
2 changes: 1 addition & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"cli": {
"packageManager": "yarn",
"packageManager": "bun",
"analytics": false
},
"schematics": {
Expand Down
Loading
Loading