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
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
9 changes: 6 additions & 3 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.2/schema.json",
"$schema": "https://unpkg.com/@changesets/config@3.0.5/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "apteryxxyz/next-ws" }
],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [],
"changelog": ["@changesets/changelog-git", { "repo": "apteryxxyz/next-ws" }]
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/sweet-spies-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"next-ws": major
---

Merged the core and CLI packages into a single package. This change does not introduce any breaking changes to the public API of the core package.
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: apteryxxyz
ko_fi: apteryx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Setup Workflow
description: Setup workflow for GitHub Actions
name: Setup Node.js
description: Setup Node.js, PNPM, and install dependencies

runs:
using: "composite"
Expand Down
16 changes: 0 additions & 16 deletions .github/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,3 @@
- name: dependencies
color: d93f0b
description: Dependency updates!!

- name: e:simple-chat-app
color: 0075ca
description: Simple chat app example

- name: e:with-custom-server
color: 0075ca
description: Example with custom server

- name: p:cli
color: 0075ca
description: CLI package

- name: p:core
color: 0075ca
description: Core package
16 changes: 0 additions & 16 deletions .github/pr-labels.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
"dependencies":
- changed-files:
- any-glob-to-any-file: ["pnpm-lock.yaml"]

"e:simple-chat-app":
- changed-files:
- any-glob-to-any-file: ["examples/simple-chat-app/**"]

"e:with-custom-server":
- changed-files:
- any-glob-to-any-file: ["examples/with-custom-server/**"]

"p:cli":
- changed-files:
- any-glob-to-any-file: ["packages/cli/**"]

"p:core":
- changed-files:
- any-glob-to-any-file: ["packages/core/**"]
74 changes: 74 additions & 0 deletions .github/workflows/bump-next-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Bump Next.js Version

on:
# TODO: Test this when the next version of Next.js is released
# schedule:
# - cron: "0 0 * * *"
workflow_dispatch:

jobs:
check-next-version:
name: Check for New Next.js Version
runs-on: ubuntu-latest
outputs:
current_version: ${{ steps.get-current-version.outputs.current_version }}
latest_version: ${{ steps.get-latest-version.outputs.latest_version }}
bump_needed: ${{ steps.compare-versions.outputs.bump_needed }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: ./.github/actions/node

- name: Get Current Next.js Version
id: get-current-version
run: |
current_version=$(pnpm list next | grep -o 'next [0-9].*' | cut -d ' ' -f 2)
echo "current_version=$current_version" >> $GITHUB_OUTPUT

- name: Get Latest Next.js Version
id: get-latest-version
run: |
latest_version=$(npm show next version)
echo "latest_version=$latest_version" >> $GITHUB_OUTPUT

- name: Compare Versions
id: compare-versions
run: |
if [ "$latest_version" != "$current_version" ]; then
echo "bump_needed=true" >> $GITHUB_OUTPUT
else
echo "bump_needed=false" >> $GITHUB_OUTPUT

update-next-version:
name: Bump Next.js Version
runs-on: ubuntu-latest
if: ${{ needs.check-next-version.outputs.bump_needed == 'true' }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: ./.github/actions/node

- name: Update Next.js Version
run: pnpm update next@latest -r

- name: Bump Supported Range
run: |
new_version="${{ needs.check-next-version.outputs.latest_version }}"
patch_file=$(ls src/patches/patch-*.ts | sort -V | tail -n 1)
sed -i "s/\(versions: .*\) <=[0-9\.]\+/\1 <=$new_version/" "$patch_file"

- name: Make Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Bump patch supported range to ${{ needs.check-next-version.outputs.latest_version }}"
branch: "bump-next-version"
title: "Bump patch supported range to ${{ needs.check-next-version.outputs.latest_version }}"
body: "Bump patch supported range to ${{ needs.check-next-version.outputs.latest_version }}"
delete-branch: true
71 changes: 57 additions & 14 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,82 @@ name: Continuous Integration

on:
push:
branches:
- main
branches: [main]
pull_request:
branches: [main]
types: [opened, synchronize, reopened]
workflow_dispatch:
workflow_call:

jobs:
lint:
check:
name: Type Checking
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: ./.github/actions/node

- name: Run the type checker
run: pnpm check

quality:
name: Linting
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Workflow
uses: ./.github/actions/setup
- name: Setup Node.js
uses: ./.github/actions/node

- name: Run Linter
- name: Run the linter
run: pnpm lint

build:
name: Building
needs: lint
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Workflow
uses: ./.github/actions/setup
- name: Setup Node.js
uses: ./.github/actions/node

- name: Build project
- name: Build the package
run: pnpm build

test:
name: Testing
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: ./.github/actions/node

- name: Install playwright browsers
run: pnpm playwright install --with-deps

- name: Run e2e tests
run: pnpm test

- name: Upload test outputs
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: test-outputs
path: |
tests/.report/
tests/.results/
include-hidden-files: true
retention-days: 7
12 changes: 5 additions & 7 deletions .github/workflows/label-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,22 @@ name: Label Sync
on:
workflow_dispatch:
push:
branches:
- main
paths:
- .github/labels.yml
branches: [main]
paths: [.github/labels.yml]

jobs:
sync:
name: Label sync
name: Label Sync
runs-on: ubuntu-latest
permissions:
contents: read
issues: write

steps:
- name: Checkout code
- name: Checkout repository
uses: actions/checkout@v4

- name: Label sync
- name: Sync labels
uses: crazy-max/ghaction-github-labeler@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/pr-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:

jobs:
label:
name: Label pull request
name: Label Pull Request
if: github.event.action != 'edited'
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write

steps:
- name: Label pull request
- name: Apply pull request labels
uses: actions/labeler@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/publish-snapshot.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/release-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Release Snapshot

on:
push:
branches: [main]
paths: [".changesets/**"]
workflow_dispatch:

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release Snapshot
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: ./.github/actions/node

- name: Publish snapshot version
run: pnpm run release:snapshot
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Node
node_modules/

.turbo/
.nx/

# Build
dist/
.next/

# Test Results
tests/.report/
tests/.results/
3 changes: 3 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
set -eu
pnpm biome check --staged --files-ignore-unknown=true --no-errors-on-unmatched
6 changes: 0 additions & 6 deletions .npmignore

This file was deleted.

4 changes: 2 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"recommendations": [
"biomejs.biome",
"jgclark.vscode-todo-highlight",
"streetsidesoftware.code-spell-checker",
"formulahendry.auto-rename-tag"
"gruntfuggly.todo-tree",
"ms-playwright.playwright"
]
}
Loading