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
4 changes: 2 additions & 2 deletions .github/workflows/docsite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ jobs:
exit 1
fi

# The docs have a separate installation using Node 22 due to needing newer dependencies
# The docs have a separate installation
- name: Install Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version-file: docs/.nvmrc
node-version-file: .nvmrc

- run: yarn --immutable
working-directory: ./docs
Expand Down
37 changes: 16 additions & 21 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,20 @@ jobs:
fail-fast: false
matrix:
include:
# node 22/npm 10 on ubuntu and windows
- os: ubuntu-latest
# npm 6 and 8 have slightly different behavior with verdaccio in publishing tests.
# It's unclear if this translates to meaningful differences in behavior in actual scenarios,
# but test against both versions to be safe. (Only do this on the ubuntu build for speed.)
npm: 6
node: 14
# node 14/npm 8 on ubuntu and windows
- os: ubuntu-latest
npm: 8
node: 14
npm: 10
node: 22
- os: windows-latest
npm: 8
node: 14
# node 20/npm 11 on ubuntu and windows (can't use 22 for reasons described in release.yml)
npm: 10
node: 22
# node 24/npm 11 on ubuntu and windows
- os: ubuntu-latest
npm: 11
node: 20
node: 24
- os: windows-latest
npm: 11
node: 20
node: 24

name: build (${{ matrix.os }}, node ${{ matrix.node }}, npm ${{ matrix.npm }})

Expand All @@ -57,21 +51,22 @@ jobs:
cache: yarn
node-version: ${{ matrix.node }}

# Guarantee a predictable version of npm for the first round of tests
# Guarantee a predictable version of npm
- name: Install npm@${{ matrix.npm }}
run: npm install --global npm@${{ matrix.npm }}

- run: yarn --frozen-lockfile
- run: yarn --immutable

- run: yarn build --verbose

- run: yarn checkchange --verbose

- run: yarn format:check
if: matrix.os == 'ubuntu-latest' && matrix.node == 14 && matrix.npm == 8
if: matrix.os == 'ubuntu-latest' && matrix.node == 22

- run: yarn lint:ci
if: matrix.os == 'ubuntu-latest' && matrix.node == 14 && matrix.npm == 8
# TODO: re-enable when updating eslint
# - run: yarn lint:ci
# if: matrix.os == 'ubuntu-latest' && matrix.node == 22

- run: yarn test --verbose
id: test
Expand All @@ -97,7 +92,7 @@ jobs:
path: ${{ env.NPM_CACHE_DIR }}/_logs
retention-days: 3

# The docs have a separate installation using Node 22 due to needing newer dependencies
# The docs have a separate installation
docs:
name: build docs

Expand All @@ -111,7 +106,7 @@ jobs:
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
cache: yarn
node-version-file: ./docs/.nvmrc
node-version-file: .nvmrc

- run: yarn --immutable
working-directory: ./docs
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ name: Release
on:
workflow_dispatch:

# Use newer node and npm for trusted publishing support. Can't use node 22 yet because of test issues.
# (`npm login` hangs with the current verdaccio version; this is fixed in latest verdaccio, but it's
# not compatible with old node)
env:
nodeVersion: 20
nodeVersion: 24
npmVersion: 11

concurrency:
Expand Down Expand Up @@ -50,7 +47,7 @@ jobs:
- name: Install npm@${{ env.npmVersion }}
run: npm install --global npm@${{ env.npmVersion }}

- run: yarn --frozen-lockfile
- run: yarn --immutable

- run: yarn build --verbose

Expand Down
12 changes: 7 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ lib/
package-lock.json
target
.claude/settings.local.json
# ignore when switching between yarn 1/4 branches
/.yarn

docs/.vuepress/.cache
docs/.vuepress/.temp
docs/.yarn/*
!docs/.yarn/patches/
!docs/.yarn/releases/
docs/.yarn

.yarn/*
!.yarn/patches/
!.yarn/releases/
# Ignore this in case a local .npmrc is added with a token for publishing
.npmrc
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14
22
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.yarn/
*.log
*.patch
*.snap
Expand Down
8 changes: 2 additions & 6 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
"args": ["--", "--runInBand", "--watch", "--testTimeout=1000000", "${file}"],
"sourceMaps": true,
"outputCapture": "std",
"console": "integratedTerminal",
// Debug with Node 14 via nvm.
// On Windows, you might have to change this to a specific version.
"runtimeVersion": "14"
"console": "integratedTerminal"
},
{
"type": "node",
Expand Down Expand Up @@ -56,8 +53,7 @@
"--runTestsByPath",
"${jest.testFile}"
],
"console": "integratedTerminal",
"runtimeVersion": "14"
"console": "integratedTerminal"
}
]
}
File renamed without changes.
16 changes: 16 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
approvedGitRepositories:
- '**'

enableScripts: true

nodeLinker: node-modules

npmMinimalAgeGate: 3d

npmPreapprovedPackages:
- lage
- workspace-tools

preferReuse: true

yarnPath: .yarn/releases/yarn-4.14.1.cjs
9 changes: 6 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

Beachball is a CLI tool for automating semantic version bumping, changelog generation, and npm publishing in monorepos and single-package repos.

## Branches

- `v2`: the current stable release branch from `beachball@latest` and the doc site are published.
- `main`: contains development work for the next major release of beachball, version 3. Breaking changes are allowed if necessary.

## Monorepo structure

- `packages/beachball`: `beachball` package
- `scripts`: repo-internal scripts (`@microsoft/beachball-scripts`)

## Commands

Beachball currently uses Node 14. Before running tests, you may need to activate `nvm`: on Mac or Linux, `source ~/.nvm/nvm.sh && nvm use`.

### Top-level

These commands work at the top level of the monorepo.
Expand Down Expand Up @@ -124,7 +127,7 @@ Test helpers in `src/__fixtures__/` provide mock factories for repos, logs, pack

## Documentation site

The doc site uses Vuepress and is located under `/docs`. It uses a separate yarn installation with Node 22 + Yarn 4 to get rid of very outdated deps while keeping beachball v2 on Node 14.
The doc site uses Vuepress and is located under `/docs`. It uses a separate yarn installation to keep the docs dependencies separate.

### Editing and validating docs

Expand Down
8 changes: 6 additions & 2 deletions beachball.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ const config = {
branch: 'main',
commit: false,
groupChanges: true,
ignorePatterns: ['.*ignore', '.eslintrc.js', 'jest.*.js', 'src/__*/**'],

// TODO (release): change back to major
disallowedChangeTypes: ['prerelease'],
// TODO (release): remove
// TODO (release): remove these
defaultNpmTag: 'next',
gitTags: false,
canaryName: 'alpha',

ignorePatterns: ['.*ignore', '.eslintrc.js', 'jest.*.js', 'src/__*/**'],
};

module.exports = config;
7 changes: 7 additions & 0 deletions change/beachball-1931a017-8cfd-4934-b93b-8b37360f7fe2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "major",
"comment": "Require Node **22.18.0** or newer, and use ES2024 syntax in output",
"packageName": "beachball",
"email": "elcraig@microsoft.com",
"dependentChangeType": "patch"
}
11 changes: 11 additions & 0 deletions change/change-1417f22a-32db-4922-b540-d2db8a52de53.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"type": "patch",
"comment": "Update typescript to v6.0",
"packageName": "beachball",
"email": "elcraig@microsoft.com",
"dependentChangeType": "patch"
}
]
}
1 change: 0 additions & 1 deletion docs/.nvmrc

This file was deleted.

2 changes: 1 addition & 1 deletion docs/.yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ nodeLinker: node-modules

preferReuse: true

yarnPath: .yarn/releases/yarn-4.14.1.cjs
yarnPath: ../.yarn/releases/yarn-4.14.1.cjs
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Beachball doc site

This site is built with Vuepress v2. It uses a separate yarn installation with Node 22 + Yarn 4 to get rid of very outdated deps while keeping beachball v2 on Node 14.
This site is built with Vuepress v2. It uses a separate yarn installation--this was originally done to get rid of very outdated deps while keeping beachball v2 on Node 14, but even with beachball updated, it's still somewhat helpful to separate the installations to easily see which deps and security alerts are doc-only.
4 changes: 1 addition & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@beachball/docs",
"version": "0.0.0",
"description": "Separate package with separate build to get rid of very outdated deps while keeping beachball v2 on Node 14",
"private": true,
"type": "module",
"scripts": {
Expand Down Expand Up @@ -29,7 +28,6 @@
}
},
"engines": {
"node": ">=22",
"yarn": "^4"
"node": ">=22.18.0"
}
}
4 changes: 2 additions & 2 deletions docs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"compilerOptions": {
"noEmit": true,
"strict": true,
"lib": ["es2022", "dom"],
"module": "es2022",
"lib": ["es2024", "dom"],
"module": "preserve", // handled by vite
"moduleResolution": "bundler",
"types": ["node"]
},
Expand Down
Loading
Loading