Merge branch 'release-3.4.1' into tools-node-env-fix

This commit is contained in:
Nacho Codoñer
2026-03-05 14:33:52 +01:00
committed by GitHub
11 changed files with 469 additions and 12 deletions

View File

@@ -0,0 +1,141 @@
# @meteorjs/rspack
The default [Rspack](https://rspack.dev) configuration for Meteor applications. This package provides everything you need to bundle your Meteor app with Rspack out of the box: client and server builds, SWC transpilation, React/Blaze/Angular support, hot module replacement, asset management, and all the Meteor-specific wiring so you don't have to.
When Meteor runs with the Rspack bundler enabled, this package is what generates the underlying Rspack configuration. It detects your project setup (TypeScript, React, Blaze, Angular), sets up the right loaders and plugins, defines `Meteor.isClient`/`Meteor.isServer` and friends, configures caching, and exposes a set of helpers you can use in your own `rspack.config.js` to customize the build without breaking Meteor integration.
## What it provides
- **Dual client/server builds** with the correct targets, externals, and output paths
- **SWC-based transpilation** for JS/TS/JSX/TSX with automatic framework detection
- **React Fast Refresh** in development when React is enabled
- **Blaze template handling** via ignore-loader when Blaze is enabled
- **Persistent filesystem caching** for fast rebuilds
- **Asset externals and HTML generation** through custom Rspack plugins
- **A `defineConfig` helper** that accepts a factory function receiving Meteor environment flags and build utilities
- **Customizable config** via `rspack.config.js` in your project root, with safe merging that warns if you try to override reserved settings
## Installation
[Rspack integration](https://docs.meteor.com/about/modern-build-stack/rspack-bundler-integration.html) is automatically managed by the rspack Atmosphere package.
```bash
meteor add rspack
```
By doing this, your Meteor app will automatically serve `@meteorjs/rspack` and the required `@rspack/cli`, `@rspack/core`, among others.
## Usage
In your project's `rspack.config.js`, use the `defineConfig` helper to customize the build. The factory function receives a `env` object with Meteor environment flags and helper utilities:
```js
const { defineConfig } = require('@meteorjs/rspack');
module.exports = defineConfig((env, argv) => {
// env.isClient, env.isServer, env.isDevelopment, env.isProduction
// env.isReactEnabled, env.isBlazeEnabled, etc.
return {
// Your custom Rspack configuration here.
// It gets safely merged with the Meteor defaults.
};
});
```
More information is available in the official docs: [Rspack Bundler Integration](https://docs.meteor.com/about/modern-build-stack/rspack-bundler-integration.html#custom-rspack-config-js).
## Development
### Install dependencies
```bash
npm install
```
### Version bumping
Use `npm run bump` to update the version in `package.json` before publishing.
```bash
npm run bump -- <major|minor|patch> [--beta]
```
**Standard bumps** increment the version and remove any prerelease suffix:
```bash
npm run bump -- patch # 1.0.1 -> 1.0.2
npm run bump -- minor # 1.0.1 -> 1.1.0
npm run bump -- major # 1.0.1 -> 2.0.0
```
**Beta bumps** append or increment a `-beta.N` prerelease suffix:
```bash
npm run bump -- patch --beta # 1.0.1 -> 1.0.2-beta.0
npm run bump -- patch --beta # 1.0.2-beta.0 -> 1.0.2-beta.1
npm run bump -- patch --beta # 1.0.2-beta.1 -> 1.0.2-beta.2
```
If you change the bump level while on a beta, the base version updates and the beta counter resets:
```bash
npm run bump -- minor --beta # 1.0.2-beta.2 -> 1.1.0-beta.0
npm run bump -- major --beta # 1.1.0-beta.0 -> 2.0.0-beta.0
```
### Publishing a beta release
After bumping to a beta version, publish to the `beta` dist-tag:
```bash
npm run bump -- patch --beta
npm run publish:beta
```
Users can then install the beta with:
```bash
npm install @meteorjs/rspack@beta
```
You can pass extra flags to `npm publish` through the script:
```bash
npm run publish:beta -- --dry-run
```
### Publishing an official release
After bumping to a stable version, publish with the default `latest` tag:
```bash
npm run bump -- patch
npm publish
```
### Typical workflows
**Beta iteration**: ship multiple beta builds for the same upcoming patch:
```bash
npm run bump -- patch --beta # 1.0.1 -> 1.0.2-beta.0
npm run publish:beta
# ... fix issues ...
npm run bump -- patch --beta # 1.0.2-beta.0 -> 1.0.2-beta.1
npm run publish:beta
```
**Promote beta to stable**: once the beta is ready, bump to the stable version and publish:
```bash
npm run bump -- patch # 1.0.2-beta.1 -> 1.0.3
npm publish
```
**Direct stable release**: skip the beta phase entirely:
```bash
npm run bump -- minor # 1.0.1 -> 1.1.0
npm publish
```

View File

@@ -0,0 +1,89 @@
#!/usr/bin/env node
'use strict';
const fs = require('fs');
const path = require('path');
const semver = require('semver');
const VALID_LEVELS = ['major', 'minor', 'patch'];
function usage() {
console.log(`Usage: node ${path.basename(__filename)} <major|minor|patch> [--beta]`);
console.log('');
console.log('Examples:');
console.log(' patch # 1.0.1 -> 1.0.2');
console.log(' minor # 1.0.1 -> 1.1.0');
console.log(' major # 1.0.1 -> 2.0.0');
console.log(' patch --beta # 1.0.1 -> 1.0.2-beta.0');
console.log(' patch --beta # 1.0.2-beta.0 -> 1.0.2-beta.1 (already beta, bumps beta number)');
console.log(' minor --beta # 1.0.2-beta.1 -> 1.1.0-beta.0 (different bump level resets)');
process.exit(1);
}
const args = process.argv.slice(2);
const level = args[0];
const beta = args.includes('--beta');
if (!level || !VALID_LEVELS.includes(level)) {
if (level) console.error(`Error: first argument must be major, minor, or patch`);
usage();
}
const pkgPath = path.resolve(__dirname, '..', 'package.json');
const raw = fs.readFileSync(pkgPath, 'utf8');
const pkg = JSON.parse(raw);
const current = pkg.version;
const parsed = semver.parse(current);
if (!parsed) {
console.error(`Error: invalid current version "${current}"`);
process.exit(1);
}
let newVersion;
if (beta) {
const isBeta = parsed.prerelease.length > 0 && parsed.prerelease[0] === 'beta';
if (isBeta) {
// Already a beta. The base version already has a prior bump applied.
// Check if the same bump level is being requested by inspecting which
// components are zeroed out (major resets minor+patch, minor resets patch).
// If the same level, just increment the beta number.
const { major, minor, patch } = parsed;
const betaNum = typeof parsed.prerelease[1] === 'number' ? parsed.prerelease[1] : 0;
let sameLevel = false;
if (level === 'patch') {
sameLevel = true;
} else if (level === 'minor') {
sameLevel = patch === 0 && minor > 0;
} else if (level === 'major') {
sameLevel = minor === 0 && patch === 0;
}
if (sameLevel) {
newVersion = `${major}.${minor}.${patch}-beta.${betaNum + 1}`;
} else {
const bumped = semver.inc(`${major}.${minor}.${patch}`, level);
newVersion = `${bumped}-beta.0`;
}
} else {
// Not a beta yet: bump the base and start at beta.0
const bumped = semver.inc(current, level);
newVersion = `${bumped}-beta.0`;
}
} else {
if (parsed.prerelease.length > 0) {
// Currently a prerelease: bump base version from the clean base
const cleanBase = `${parsed.major}.${parsed.minor}.${parsed.patch}`;
newVersion = semver.inc(cleanBase, level);
} else {
newVersion = semver.inc(current, level);
}
}
pkg.version = newVersion;
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n');
console.log(`Bumped version: ${current} -> ${newVersion}`);

View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail
npm publish --tag beta "$@"

View File

@@ -163,10 +163,6 @@ export default defineConfig({
text: "Roadmap",
link: "/about/roadmap",
},
{
text: "Contributing",
link: "/about/contributing",
}
],
collapsed: true,
},
@@ -631,6 +627,20 @@ export default defineConfig({
],
collapsed: true,
},
{
text: "Community",
items: [
{
text: "Contributing",
link: "/community/contributing",
},
{
text: "Contributors",
link: "/community/contributors",
},
],
collapsed: true,
},
],
socialLinks: [

View File

@@ -0,0 +1,106 @@
<script setup lang="ts">
import type { Contributor } from '../../community/contributors.data'
withDefaults(defineProps<{
contributors: Contributor[]
showContributions?: boolean
}>(), {
showContributions: true,
})
function avatarUrl(url: string): string {
return url.includes('?') ? `${url}&s=80` : `${url}?s=80`
}
</script>
<template>
<div v-if="contributors.length" class="contributors-grid">
<a
v-for="contributor in contributors"
:key="contributor.login"
:href="contributor.html_url"
target="_blank"
rel="noopener noreferrer"
class="contributor-card"
>
<img
:src="avatarUrl(contributor.avatar_url)"
:alt="contributor.login"
class="contributor-avatar"
loading="lazy"
width="64"
height="64"
/>
<div class="contributor-info">
<span class="contributor-name">{{ contributor.login }}</span>
<span v-if="showContributions" class="contributor-commits">
{{ contributor.contributions.toLocaleString() }}
{{ contributor.contributions === 1 ? 'commit' : 'commits' }}
</span>
</div>
</a>
</div>
<p v-else class="contributors-empty">
Could not load contributors. Check the
<a href="https://github.com/meteor/meteor/graphs/contributors" target="_blank" rel="noopener noreferrer">
GitHub contributors page
</a>.
</p>
</template>
<style scoped>
.contributors-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
gap: 12px;
margin-top: 24px;
}
.contributor-card {
display: flex;
flex-direction: column;
align-items: center;
padding: 16px 8px;
border: 1px solid var(--vp-c-divider);
border-radius: 8px;
text-decoration: none;
transition: border-color 0.25s, background-color 0.25s;
}
.contributor-card:hover {
border-color: var(--vp-c-brand-1);
background-color: var(--vp-c-bg-soft);
}
.contributor-avatar {
width: 64px;
height: 64px;
border-radius: 50%;
margin-bottom: 10px;
}
.contributor-info {
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
}
.contributor-name {
font-size: 0.85rem;
font-weight: 600;
color: var(--vp-c-text-1);
text-align: center;
word-break: break-all;
}
.contributor-commits {
font-size: 0.75rem;
color: var(--vp-c-text-2);
}
.contributors-empty {
color: var(--vp-c-text-2);
margin-top: 24px;
}
</style>

View File

@@ -3,6 +3,7 @@ import type { Theme } from "vitepress";
import DefaultTheme from "vitepress/theme";
import ApiBox from "../../components/ApiBox.vue";
import ApiMap from "../../components/ApiMap.vue";
import Contributors from "./Contributors.vue";
import Layout from "./Layout.vue";
import "./theme.css";
@@ -12,6 +13,7 @@ export default {
// register your custom global components
app.component("ApiBox", ApiBox);
app.component("ApiMap", ApiMap);
app.component("Contributors", Contributors);
},
Layout,
} satisfies Theme;

View File

@@ -125,6 +125,7 @@
### [retry](https://github.com/meteor/meteor/tree/devel/packages/retry) {#retry}
### [roles](https://github.com/meteor/meteor/tree/devel/packages/roles) {#roles}
### [routepolicy](https://github.com/meteor/meteor/tree/devel/packages/routepolicy) {#routepolicy}
### [rspack](https://github.com/meteor/meteor/tree/devel/packages/rspack) {#rspack}
### [server-render](https://github.com/meteor/meteor/tree/devel/packages/server-render) {#server-render}
### [service-configuration](https://github.com/meteor/meteor/tree/devel/packages/service-configuration) {#service-configuration}
### [session](https://github.com/meteor/meteor/tree/devel/packages/session) {#session}
@@ -142,6 +143,7 @@
### [test-server-tests-in-console-once](https://github.com/meteor/meteor/tree/devel/packages/test-server-tests-in-console-once) {#test-server-tests-in-console-once}
### [tinytest](https://github.com/meteor/meteor/tree/devel/packages/tinytest) {#tinytest}
### [tinytest-harness](https://github.com/meteor/meteor/tree/devel/packages/tinytest-harness) {#tinytest-harness}
### [tools-core](https://github.com/meteor/meteor/tree/devel/packages/tools-core) {#tools-core}
### [tracker](https://github.com/meteor/meteor/tree/devel/packages/tracker) {#tracker}
### [twitter-config-ui](https://github.com/meteor/meteor/tree/devel/packages/twitter-config-ui) {#twitter-config-ui}
### [twitter-oauth](https://github.com/meteor/meteor/tree/devel/packages/twitter-oauth) {#twitter-oauth}

View File

@@ -0,0 +1,60 @@
export interface Contributor {
login: string
avatar_url: string
html_url: string
contributions: number
}
declare const data: Contributor[]
export { data }
export default {
async load(): Promise<Contributor[]> {
const contributors: Contributor[] = []
let page = 1
const perPage = 100
while (true) {
const headers: Record<string, string> = {
Accept: 'application/vnd.github.v3+json',
'User-Agent': 'meteor-docs-builder',
}
if (process.env.GITHUB_TOKEN) {
headers['Authorization'] = `Bearer ${process.env.GITHUB_TOKEN}`
}
const response = await fetch(
`https://api.github.com/repos/meteor/meteor/contributors?per_page=${perPage}&page=${page}`,
{ headers }
)
if (!response.ok) {
console.warn(
`[contributors.data] GitHub API error: ${response.status} ${response.statusText}`
)
break
}
const batch = (await response.json()) as any[]
if (!batch.length) break
contributors.push(
...batch
.filter((c) => c.type === 'User')
.map((c) => ({
login: c.login,
avatar_url: c.avatar_url,
html_url: c.html_url,
contributions: c.contributions,
}))
)
if (batch.length < perPage) break
page++
}
return contributors
},
}

View File

@@ -0,0 +1,43 @@
---
outline: false
---
<script setup>
import { data as contributors } from './contributors.data'
const technicalCommittee = [
{ login: 'italojs', avatar_url: 'https://github.com/italojs.png', html_url: 'https://github.com/italojs', contributions: 0 },
{ login: 'Grubba27', avatar_url: 'https://github.com/Grubba27.png', html_url: 'https://github.com/Grubba27', contributions: 0 },
{ login: 'nachocodoner', avatar_url: 'https://github.com/nachocodoner.png', html_url: 'https://github.com/nachocodoner', contributions: 0 },
{ login: 'fredmaiaarantes', avatar_url: 'https://github.com/fredmaiaarantes.png', html_url: 'https://github.com/fredmaiaarantes', contributions: 0 },
{ login: 'henriquealbert', avatar_url: 'https://github.com/henriquealbert.png', html_url: 'https://github.com/henriquealbert', contributions: 0 },
{ login: 'aquinoit', avatar_url: 'https://github.com/aquinoit.png', html_url: 'https://github.com/aquinoit', contributions: 0 },
{ login: 'MarlomSouza', avatar_url: 'https://github.com/MarlomSouza.png', html_url: 'https://github.com/MarlomSouza', contributions: 0 },
]
const coreMaintainers = [
{ login: 'radekmie', avatar_url: 'https://github.com/radekmie.png', html_url: 'https://github.com/radekmie', contributions: 0 },
{ login: 'StorytellerCZ', avatar_url: 'https://github.com/StorytellerCZ.png', html_url: 'https://github.com/StorytellerCZ', contributions: 0 },
{ login: 'zodern', avatar_url: 'https://github.com/zodern.png', html_url: 'https://github.com/zodern', contributions: 0 },
]
</script>
# Contributors
## Technical Committee
The Technical Committee is responsible for the direction and governance of the Meteor project.
<Contributors :contributors="technicalCommittee" :show-contributions="false" />
## Core Maintainers
Core Maintainers are experienced contributors who actively maintain key areas of the Meteor codebase.
<Contributors :contributors="coreMaintainers" :show-contributions="false" />
## All Contributors
Thank you to all the amazing people who have contributed to Meteor! This list is automatically generated from the [meteor/meteor](https://github.com/meteor/meteor) GitHub repository, sorted by number of commits.
<Contributors :contributors="contributors" />

View File

@@ -10,21 +10,23 @@ This is a complete history of changes for Meteor releases.
[//]: # (go to meteor/docs/generators/changelog/docs)
## v3.4.0, 30-01-2026
### Highlights
- **Meteor-Rspack Integration**, [PR#13910](https://github.com/meteor/meteor/pull/13910)
- ⚡ New `rspack` atmosphere package (requires at least rspack@1.7.1)
Orchestrates the full Rspack setup, including the development server and production builds.
Orchestrates the full Rspack setup, including the development server and production builds.
- 📦 New `@meteorjs/rspack` npm package
Provides a default rspack.config.js. Applications can extend or override this configuration with their own.
Provides a default rspack.config.js. Applications can extend or override this configuration with their own.
- 🛠️ New `tools-core` package
Supplies runtime utilities for Meteor, designed to support this integration and future tool integrations.
Supplies runtime utilities for Meteor, designed to support this integration and future tool integrations.
- 🔑 Core updates
Enhanced Meteors core to support the Rspack integration.
Enhanced Meteors core to support the Rspack integration.
- ✅ Test suite additions
Introduced tests for app skeletons and Meteor-Rspack features to ensure quality and reliability.
Introduced tests for app skeletons and Meteor-Rspack features to ensure quality and reliability.
- 📃 [Documentation](https://docs.meteor.com/about/modern-build-stack/rspack-bundler-integration.html)
Complete documentation section covering all details of the Meteor-Rspack integration, including migration guides, configuration helpers and more.
- Adopting Rspack gives you a faster build experience
@@ -155,8 +157,7 @@ If you find any issues, please report them to the [Meteor issues tracker](https:
- [@jeetburman](https://github.com/jeetburman)
- [@copleykj](https://github.com/copleykj)
✨✨✨
✨✨✨
## v3.3.2, 01-09-2025
### Highlights
@@ -226,7 +227,6 @@ If you find any issues, please report them to the [Meteor issues tracker](https:
- [@copleykj](https://github.com/copleykj)
✨✨✨
## v3.3.1, 05-08-2025
### Highlights