Skip to content
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 14 additions & 7 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
{
"env": {
"node": true,
"mocha": true,
"es2021": true
},
"parser": "@babel/eslint-parser",
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 8,
"requireConfigFile": false
"ecmaVersion": 2021
},
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"google"
"google",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"arrow-parens": ["error",
Expand All @@ -25,12 +27,17 @@
"no-empty": ["error", {
"allowEmptyCatch": true
}],
"no-unused-vars": ["error", {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", {
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": false
}],

"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-empty-object-type": ["error", {
"allowInterfaces": "with-single-extends"
}],
"require-jsdoc": ["error", {
"require": {
"FunctionDeclaration": true,
Expand Down
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@
*.vcl text eol=lf
lash text eol=lf
landorc text eol=lf

# Use bd merge for beads JSONL files
.beads/issues.jsonl merge=beads
21 changes: 12 additions & 9 deletions .github/workflows/deploy-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Deploy npm
on:
workflow_call:
inputs:
node-version:
default: "20"
description: The node version to use
bun-version:
default: "1.3.5"
description: The bun version to use
required: false
type: string
secrets:
Expand All @@ -24,19 +24,22 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install node ${{ inputs.node-version }}
- name: Install node 20
uses: actions/setup-node@v6
with:
node-version: ${{ inputs.node-version }}
node-version: "20"
registry-url: https://registry.npmjs.org
cache: npm
- name: Install bun ${{ inputs.bun-version }}
uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ inputs.bun-version }}

- name: Install dependencies
run: npm clean-install --prefer-offline --frozen-lockfile
run: bun install --frozen-lockfile
- name: Lint code
run: npm run lint
run: bun run lint
- name: Run unit tests
run: npm run test:unit
run: bun run test:unit

- name: Update edge release alias
shell: bash
Expand Down
49 changes: 27 additions & 22 deletions .github/workflows/pkg-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ on:
description: The name of the resulting binary
required: false
type: string
node-version:
default: "20"
description: The node version to build for eg 16 | 18 | 20
required: true
type: string
os:
default: linux
description: The os to build for eg linux | macos | win
Expand All @@ -44,15 +39,14 @@ jobs:
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install node ${{ inputs.node-version }}
uses: actions/setup-node@v6
- name: Install bun
uses: oven-sh/setup-bun@v2
with:
node-version: ${{ inputs.node-version }}
cache: npm
bun-version: "1.3.5"
- name: Install dependencies
run: npm clean-install --prefer-offline --frozen-lockfile --production
run: bun install --frozen-lockfile
- name: Install plugins
run: scripts/install-plugins.sh --lando bin/lando ${{ inputs.edge == true && '--edge' || '' }}
run: scripts/install-plugins.sh --lando bin/lando --bun ${{ inputs.edge == true && '--edge' || '' }}
- name: Switch to edge channel
if: inputs.edge == true
run: |
Expand All @@ -63,22 +57,33 @@ jobs:
with:
version: ${{ inputs.version }}
sync: false
- name: Set build target
id: target
run: |
OS=${{ inputs.os }}
ARCH=${{ inputs.arch }}
if [ "$OS" = "macos" ]; then OS="darwin"; fi
if [ "$OS" = "win" ]; then
echo "target=bun-windows-${ARCH}" >> $GITHUB_OUTPUT
echo "ext=.exe" >> $GITHUB_OUTPUT
else
echo "target=bun-${OS}-${ARCH}" >> $GITHUB_OUTPUT
echo "ext=" >> $GITHUB_OUTPUT
fi
- name: Package into binary
uses: lando/pkg-action@v6
run: |
mkdir -p dist
bun build ./bin/lando --compile --target=${{ steps.target.outputs.target }} --outfile=dist/${{ inputs.filename }}${{ steps.target.outputs.ext }}
- name: Upload binary
uses: actions/upload-artifact@v4
with:
entrypoint: bin/lando
filename: ${{ inputs.filename }}
node-version: ${{ inputs.node-version }}
os: ${{ inputs.os }}
options: --options dns-result-order=ipv4first
pkg: "@yao-pkg/pkg@5.16.1"
upload-key: "packaged-${{ inputs.filename }}-${{ inputs.os }}-${{ inputs.arch }}-${{ github.sha }}"
name: packaged-${{ inputs.filename }}-${{ inputs.os }}-${{ inputs.arch }}-${{ github.sha }}
path: dist/${{ inputs.filename }}${{ steps.target.outputs.ext }}
if-no-files-found: error
retention-days: 1
- name: Ensure version
if: (inputs.os == 'linux' && runner.os == 'Linux') || (inputs.os == 'macos' && runner.os == 'macOS')
run: ./dist/${{ inputs.filename }} version --all
- name: Ensure ipv4first
if: (inputs.os == 'linux' && runner.os == 'Linux') || (inputs.os == 'macos' && runner.os == 'macOS')
run: ./dist/${{ inputs.filename }} config --path cli.args | grep dns-result-order=ipv4first
- name: Ensure channel
if: (inputs.os == 'linux' && runner.os == 'Linux') || (inputs.os == 'macos' && runner.os == 'macOS')
run: ./dist/${{ inputs.filename }} config --path channel | grep ${{ inputs.edge == true && 'edge' || 'stable' }}
Expand Down
35 changes: 17 additions & 18 deletions .github/workflows/pr-core-protected-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
- yaml
node-version:
- "20"
bun-version:
- "1.3.5"
os:
# - macos-14
- ubuntu-24.04
Expand All @@ -34,38 +36,35 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org
cache: npm
- name: Install bun ${{ matrix.bun-version }}
uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ matrix.bun-version }}
- name: Bundle Deps
uses: lando/prepare-release-action@v3
with:
lando-plugin: true
version: dev
sync: false
- name: Install pkg dependencies
run: npm clean-install --prefer-offline --frozen-lockfile --production
- name: Package into node binary
uses: lando/pkg-action@v6
id: pkg-action
with:
entrypoint: bin/lando
filename: lando
node-version: ${{ matrix.node-version }}
options: --options dns-result-order=ipv4first
upload: false
pkg: "@yao-pkg/pkg@5.16.1"
- name: Install full deps
run: npm clean-install --prefer-offline --frozen-lockfile
- name: Setup lando ${{ steps.pkg-action.outputs.file }}
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Build Bun binary
id: build-binary
run: |
bun build ./bin/lando --compile --outfile dist/lando
echo "file=$(pwd)/dist/lando" >> $GITHUB_OUTPUT
- name: Setup lando ${{ steps.build-binary.outputs.file }}
uses: lando/setup-lando@v3
with:
lando-version: ${{ steps.pkg-action.outputs.file }}
lando-version: ${{ steps.build-binary.outputs.file }}
telemetry: false
config: |
setup.skipCommonPlugins=true
- name: Run Leia Tests
uses: lando/run-leia-action@v2
uses: lando/run-leia-action@bunify # TODO: switch to v2 after bunify is merged
with:
leia-test: "./examples/${{ matrix.leia-test }}/README.md"
cleanup-header: "Destroy tests"
shell: ${{ matrix.shell }}
stdin: true
runtime: bun
41 changes: 17 additions & 24 deletions .github/workflows/pr-core-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ jobs:
- update
- version
- yaml
node-version:
- "20"
bun-version:
- "1.3.5"
os:
# - macos-14
- ubuntu-24.04
Expand All @@ -72,43 +72,36 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v6
- name: Install bun ${{ matrix.bun-version }}
uses: oven-sh/setup-bun@v2
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org
cache: npm
bun-version: ${{ matrix.bun-version }}
- name: Bundle Deps
uses: lando/prepare-release-action@v3
with:
lando-plugin: true
version: dev
sync: false
- name: Install pkg dependencies
run: npm clean-install --prefer-offline --frozen-lockfile --production
- name: Package into node binary
uses: lando/pkg-action@v6
id: pkg-action
with:
entrypoint: bin/lando
filename: lando
node-version: ${{ matrix.node-version }}
options: --options dns-result-order=ipv4first
upload: false
pkg: "@yao-pkg/pkg@5.16.1"
- name: Install full deps
run: npm clean-install --prefer-offline --frozen-lockfile
- name: Setup lando ${{ steps.pkg-action.outputs.file }}
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Build lando binary
run: |
bun build ./bin/lando --compile --outfile=dist/lando
chmod +x dist/lando
echo "file=$(pwd)/dist/lando" >> $GITHUB_OUTPUT
id: build-binary
- name: Setup lando ${{ steps.build-binary.outputs.file }}
uses: lando/setup-lando@v3
with:
lando-version: ${{ steps.pkg-action.outputs.file }}
lando-version: ${{ steps.build-binary.outputs.file }}
telemetry: false
config: |
setup.skipCommonPlugins=true
- name: Run Leia Tests
uses: lando/run-leia-action@v2
uses: lando/run-leia-action@bunify # TODO: switch to v2 after bunify is merged
with:
leia-test: "./examples/${{ matrix.leia-test }}/README.md"
cleanup-header: "Destroy tests"
shell: ${{ matrix.shell }}
stdin: true
runtime: bun
Loading
Loading