Skip to content
Open
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 .chromatic-fc/.parcelrc-v3
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"@parcel/transformer-storybook-v3",
"..."
],
"packages/**/intl/**/*.json": ["parcel-transformer-intl"],
"js:packages/**/intl/**/*.json": ["parcel-transformer-intl"],

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a bit unintuitive so I will think of improvements for parcel. Parcel 3 distinguishes between compiling JSON imported from JS vs JSON referenced elsewhere (e.g. a URL in an HTML file). The js: pipeline is added automatically for JSON imported from JS, and the default transformer was winning over ours.

"packages/@adobe/**/*.css": [
"../parcel-v3/PostCSSTransformer.mjs",
{
Expand Down
2 changes: 1 addition & 1 deletion .chromatic/.parcelrc-v3
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"@parcel/transformer-storybook-v3",
"..."
],
"packages/**/intl/**/*.json": ["parcel-transformer-intl"],
"js:packages/**/intl/**/*.json": ["parcel-transformer-intl"],
"packages/@adobe/**/*.css": [
"../parcel-v3/PostCSSTransformer.mjs",
{
Expand Down
4 changes: 2 additions & 2 deletions .circleci/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async function run() {
let pr;
// If we aren't running on a PR commit, double check if this is a branch created for a fork. If so, we'll need to
// comment the build link on the fork.
if (!process.env.CIRCLE_PULL_REQUEST) {
if (true) {
try {
const commit = await octokit.git.getCommit({
owner: 'adobe',
Expand Down Expand Up @@ -51,7 +51,7 @@ async function run() {
break;
}
}
} else if (!process.env.CIRCLE_PULL_REQUEST) {
} else if (true) {
// If it isn't a PR commit, then we are on main. Create a comment for the test app and docs build
await octokit.repos.createCommitComment({
owner: 'adobe',
Expand Down
5 changes: 1 addition & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ executors:
resource_class: medium.gen2
environment: &global-environment
CACHE_VERSION: v1
# PARCEL_V3: '1'
PARCEL_V3: '1'
working_directory: ~/react-spectrum

rsp-large:
Expand Down Expand Up @@ -1042,9 +1042,6 @@ workflows:
branches:
only: main
- verdaccio:
filters:
branches:
only: main
requires:
- install
- v-webpack-4:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/weekly-chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
permissions:
contents: read

env:
PARCEL_V3: '1'

jobs:
chromatic:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .storybook-s2/.parcelrc-v3
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"@parcel/transformer-storybook-v3",
"..."
],
"packages/**/intl/**/*.json": ["parcel-transformer-intl"],
"js:packages/**/intl/**/*.json": ["parcel-transformer-intl"],
"*.css": ["@parcel/transformer-css"],
"raw:*": ["@parcel/transformer-raw"]
},
Expand Down
2 changes: 1 addition & 1 deletion .storybook/.parcelrc-v3
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"@parcel/transformer-storybook-v3",
"..."
],
"packages/**/intl/**/*.json": ["parcel-transformer-intl"],
"js:packages/**/intl/**/*.json": ["parcel-transformer-intl"],
"packages/@adobe/**/*.css": [
"../parcel-v3/PostCSSTransformer.mjs",
{
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The repo is layered. Changes flow up from the lowest level:
This repo does **not** use the conventional JS toolchain — use these, don't swap in defaults:

- Format with `yarn format` (oxfmt), **not** Prettier. Lint with `yarn lint` (oxlint), **not** ESLint. Type-check with `yarn check-types` (tsc, TypeScript 7's native compiler). Build with `yarn build` (Parcel), **not** rollup/tsc.
- **Don't run `yarn chromatic` / `yarn chromatic:forced-colors`** — maintainers run the VRT suites.
- **Don't run `yarn chromatic` / `yarn chromatic:forced-colors` or their `-parcel3` siblings** — maintainers run the VRT suites.
- All commonly used commands live in the root `package.json` scripts.

## Visual verification with Storybook and docs
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Test suites are split by type:
- **Visual regression tests (VRT)** — `yarn chromatic`
- **High-contrast-mode VRT** — `yarn chromatic:forced-colors`

Maintainers run the Chromatic VRT suites themselves — don't run `yarn chromatic` / `yarn chromatic:forced-colors`. You can still start the VRT Storybooks locally to verify visual state: `yarn start:chromatic` and `yarn start:chromatic-fc`.
Maintainers run the Chromatic VRT suites themselves — don't run `yarn chromatic` / `yarn chromatic:forced-colors` or their `-parcel3` siblings. You can still start the VRT Storybooks locally to verify visual state: `yarn start:chromatic` and `yarn start:chromatic-fc`.

Tests are **not** co-located with source — each package keeps them in a sibling `test/` directory. The file suffix routes the test to a runner: `*.ssr.test.*` → `yarn test:ssr`, `*.browser.test.*` → `yarn test:browser`, plain `*.test.*` → `yarn test` (Jest). Shared test helpers live in `@react-aria/test-utils` / `@react-spectrum/test-utils` (the `User` event abstraction and per-component testers).

Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@
"build:icons": "babel-node --presets @babel/env ./scripts/buildIcons.js",
"clean:icons": "babel-node --presets @babel/env ./scripts/cleanIcons.js",
"postinstall": "patch-package && yarn build:icons",
"chromatic": "NODE_ENV=production CHROMATIC=1 chromatic --project-token $CHROMATIC_PROJECT_TOKEN --build-script-name 'build:chromatic' --only-changed --trace-changed --externals './packages/**/style/**/*'",
"chromatic:forced-colors": "NODE_ENV=production CHROMATIC=1 chromatic --project-token $CHROMATIC_FC_PROJECT_TOKEN --build-script-name 'build:chromatic-fc' --only-changed --trace-changed --externals './packages/**/style/**/*'",
"chromatic": "NODE_ENV=production CHROMATIC=1 chromatic --project-token $CHROMATIC_PROJECT_TOKEN --build-script-name 'build:chromatic'",
"chromatic-parcel3": "NODE_ENV=production CHROMATIC=1 PARCEL_V3=1 chromatic --project-token $CHROMATIC_PROJECT_TOKEN --build-script-name 'build:chromatic'",
"chromatic:forced-colors": "NODE_ENV=production CHROMATIC=1 chromatic --project-token $CHROMATIC_FC_PROJECT_TOKEN --build-script-name 'build:chromatic-fc'",
"chromatic:forced-colors-parcel3": "NODE_ENV=production CHROMATIC=1 PARCEL_V3=1 chromatic --project-token $CHROMATIC_FC_PROJECT_TOKEN --build-script-name 'build:chromatic-fc'",
"merge:css": "babel-node --presets @babel/env ./scripts/merge-spectrum-css.js",
"release": "lerna publish from-package --yes",
"version:nightly": "yarn workspaces foreach --all --no-private -t version -d --force 3.0.0-nightly-$(git rev-parse --short HEAD)-$(date +'%y%m%d') && yarn apply-nightly --all",
Expand Down Expand Up @@ -114,7 +116,7 @@
"@parcel/optimizer-terser": "^2.16.3",
"@parcel/packager-react-static": "^2.16.3",
"@parcel/packager-ts": "^2.16.3",
"@parcel/parcel3": "^3.0.0-alpha.3",
"@parcel/parcel3": "^3.0.0-alpha.4",
"@parcel/reporter-bundle-analyzer": "^2.16.3",
"@parcel/reporter-cli": "^2.16.3",
"@parcel/resolver-glob": "^2.16.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/dev/s2-docs/.parcelrc-s2-docs-v3
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"resolvers": ["@parcel/resolver-glob", "..."],
"transformers": {
"docs:*": ["@parcel/transformer-ts-doc"],
"packages/**/intl/**/*.json": ["parcel-transformer-intl"],
"js:packages/**/intl/**/*.json": ["parcel-transformer-intl"],
"url:*.svg": ["@parcel/transformer-svg", "@parcel/transformer-raw"],
"data-url:*.svg": ["@parcel/transformer-svg", "@parcel/transformer-inline"],
"starters/tailwind/**/*.css": ["@parcel/transformer-tailwind", "..."],
Expand Down
4 changes: 2 additions & 2 deletions packages/dev/s2-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"build:s2": "LIBRARY=s2 parcel build 'pages/s2/**/*.mdx' --config .parcelrc-s2-docs --dist-dir dist/s2 --cache-dir ../../../.parcel-cache/s2",
"build:react-aria": "LIBRARY=react-aria parcel build 'pages/react-aria/**/*.mdx' --config .parcelrc-s2-docs --dist-dir dist/react-aria --cache-dir ../../../.parcel-cache/react-aria",
"build:parcel3": "yarn build:s2-parcel3 && yarn build:react-aria-parcel3",
"build:s2-parcel3": "LIBRARY=s2 parcel3 build ssg-s2.tsx --config .parcelrc-s2-docs-v3 --dist-dir dist/s2 --public-url $PUBLIC_URL && node dist/s2/server/ssg-s2.js && rm -rf dist/s2/server",
"build:react-aria-parcel3": "LIBRARY=react-aria parcel3 build ssg-react-aria.tsx --config .parcelrc-s2-docs-v3 --dist-dir dist/react-aria --public-url $PUBLIC_URL && node dist/react-aria/server/ssg-react-aria.js && rm -rf dist/react-aria/server",
"build:s2-parcel3": "LIBRARY=s2 parcel3 build ssg-s2.tsx --config .parcelrc-s2-docs-v3 --dist-dir dist/s2 --public-url $PUBLIC_URL && node dist/s2/ssg-s2.js && rm -rf dist/s2/server",
"build:react-aria-parcel3": "LIBRARY=react-aria parcel3 build ssg-react-aria.tsx --config .parcelrc-s2-docs-v3 --dist-dir dist/react-aria --public-url $PUBLIC_URL && node dist/react-aria/ssg-react-aria.js && rm -rf dist/react-aria/server",
"generate:og": "node scripts/generateOGImages.mjs",
"generate:md": "node scripts/generateMarkdownDocs.mjs",
"generate:mcpb": "node scripts/generateMcpb.mjs"
Expand Down
16 changes: 4 additions & 12 deletions packages/dev/storybook-builder-parcel/preset.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,9 @@ async function createParcel(options, isDev = false) {
'3000',
'--dist-dir',
options.outputDir,
path.join(generatedEntries, 'iframe.html')
path.join(generatedEntries, 'iframe.html'),
'--public-url',
'./'
],
{stdio: 'inherit'}
);
Expand All @@ -159,17 +161,7 @@ async function createParcel(options, isDev = false) {
mode: isDev ? 'development' : 'production',
serveOptions: isDev ? {port: 3000} : null,
hmrOptions: isDev ? {port: 3001} : null,
additionalReporters: [

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@snowystinger this is for Parcel 2, not 3. Do we need to turn it off for v2 as well?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't really matter so long as it's not trying to write I think

Theoretically I think I could've left in the turbosnap one as well, it didn't cause a failure. All that mattered was when chromatic looked for the file, so the CLI call change was the real thing that mattered

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean you don't need to turn off turbosnap for v2 because it works there right?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure what would happen really if sometimes turbosnap was used (by us running locally on accident) and sometimes not (as the CI does). So I figured it was safer to turn it all off until we were ready again.

{packageName: '@parcel/reporter-cli', resolveFrom: __filename},
...(options.statsJson
? [
{
packageName: 'parcel-reporter-turbosnap-stats',
resolveFrom: __filename
}
]
: [])
],
additionalReporters: [{packageName: '@parcel/reporter-cli', resolveFrom: __filename}],
targets: {
storybook: {
distDir: options.outputDir,
Expand Down
2 changes: 1 addition & 1 deletion parcel-v3/.parcelrc-build
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"resolvers": ["@parcel/resolver-glob", "..."],
"bundler": "@parcel/bundler-library",
"transformers": {
"packages/**/intl/**/*.json": ["parcel-transformer-intl"],
"js:packages/**/intl/**/*.json": ["parcel-transformer-intl"],
"bundle-text:*.svg": ["@parcel/transformer-svg", "@parcel/transformer-inline"],
"packages/@adobe/**/*.css": [
"./PostCSSTransformer.mjs",
Expand Down
74 changes: 37 additions & 37 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5178,74 +5178,74 @@ __metadata:
languageName: node
linkType: hard

"@parcel/parcel3-darwin-arm64@npm:3.0.0-alpha.3":
version: 3.0.0-alpha.3
resolution: "@parcel/parcel3-darwin-arm64@npm:3.0.0-alpha.3"
"@parcel/parcel3-darwin-arm64@npm:3.0.0-alpha.4":
version: 3.0.0-alpha.4
resolution: "@parcel/parcel3-darwin-arm64@npm:3.0.0-alpha.4"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard

"@parcel/parcel3-darwin-x64@npm:3.0.0-alpha.3":
version: 3.0.0-alpha.3
resolution: "@parcel/parcel3-darwin-x64@npm:3.0.0-alpha.3"
"@parcel/parcel3-darwin-x64@npm:3.0.0-alpha.4":
version: 3.0.0-alpha.4
resolution: "@parcel/parcel3-darwin-x64@npm:3.0.0-alpha.4"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard

"@parcel/parcel3-linux-arm64-musl@npm:3.0.0-alpha.3":
version: 3.0.0-alpha.3
resolution: "@parcel/parcel3-linux-arm64-musl@npm:3.0.0-alpha.3"
"@parcel/parcel3-linux-arm64-musl@npm:3.0.0-alpha.4":
version: 3.0.0-alpha.4
resolution: "@parcel/parcel3-linux-arm64-musl@npm:3.0.0-alpha.4"
conditions: os=linux & cpu=arm64 & libc=musl
languageName: node
linkType: hard

"@parcel/parcel3-linux-arm64@npm:3.0.0-alpha.3":
version: 3.0.0-alpha.3
resolution: "@parcel/parcel3-linux-arm64@npm:3.0.0-alpha.3"
"@parcel/parcel3-linux-arm64@npm:3.0.0-alpha.4":
version: 3.0.0-alpha.4
resolution: "@parcel/parcel3-linux-arm64@npm:3.0.0-alpha.4"
conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node
linkType: hard

"@parcel/parcel3-linux-x64-musl@npm:3.0.0-alpha.3":
version: 3.0.0-alpha.3
resolution: "@parcel/parcel3-linux-x64-musl@npm:3.0.0-alpha.3"
"@parcel/parcel3-linux-x64-musl@npm:3.0.0-alpha.4":
version: 3.0.0-alpha.4
resolution: "@parcel/parcel3-linux-x64-musl@npm:3.0.0-alpha.4"
conditions: os=linux & cpu=x64 & libc=musl
languageName: node
linkType: hard

"@parcel/parcel3-linux-x64@npm:3.0.0-alpha.3":
version: 3.0.0-alpha.3
resolution: "@parcel/parcel3-linux-x64@npm:3.0.0-alpha.3"
"@parcel/parcel3-linux-x64@npm:3.0.0-alpha.4":
version: 3.0.0-alpha.4
resolution: "@parcel/parcel3-linux-x64@npm:3.0.0-alpha.4"
conditions: os=linux & cpu=x64 & libc=glibc
languageName: node
linkType: hard

"@parcel/parcel3-win32-arm64@npm:3.0.0-alpha.3":
version: 3.0.0-alpha.3
resolution: "@parcel/parcel3-win32-arm64@npm:3.0.0-alpha.3"
"@parcel/parcel3-win32-arm64@npm:3.0.0-alpha.4":
version: 3.0.0-alpha.4
resolution: "@parcel/parcel3-win32-arm64@npm:3.0.0-alpha.4"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard

"@parcel/parcel3-win32-x64@npm:3.0.0-alpha.3":
version: 3.0.0-alpha.3
resolution: "@parcel/parcel3-win32-x64@npm:3.0.0-alpha.3"
"@parcel/parcel3-win32-x64@npm:3.0.0-alpha.4":
version: 3.0.0-alpha.4
resolution: "@parcel/parcel3-win32-x64@npm:3.0.0-alpha.4"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard

"@parcel/parcel3@npm:^3.0.0-alpha.3":
version: 3.0.0-alpha.3
resolution: "@parcel/parcel3@npm:3.0.0-alpha.3"
"@parcel/parcel3@npm:^3.0.0-alpha.4":
version: 3.0.0-alpha.4
resolution: "@parcel/parcel3@npm:3.0.0-alpha.4"
dependencies:
"@parcel/parcel3-darwin-arm64": "npm:3.0.0-alpha.3"
"@parcel/parcel3-darwin-x64": "npm:3.0.0-alpha.3"
"@parcel/parcel3-linux-arm64": "npm:3.0.0-alpha.3"
"@parcel/parcel3-linux-arm64-musl": "npm:3.0.0-alpha.3"
"@parcel/parcel3-linux-x64": "npm:3.0.0-alpha.3"
"@parcel/parcel3-linux-x64-musl": "npm:3.0.0-alpha.3"
"@parcel/parcel3-win32-arm64": "npm:3.0.0-alpha.3"
"@parcel/parcel3-win32-x64": "npm:3.0.0-alpha.3"
"@parcel/parcel3-darwin-arm64": "npm:3.0.0-alpha.4"
"@parcel/parcel3-darwin-x64": "npm:3.0.0-alpha.4"
"@parcel/parcel3-linux-arm64": "npm:3.0.0-alpha.4"
"@parcel/parcel3-linux-arm64-musl": "npm:3.0.0-alpha.4"
"@parcel/parcel3-linux-x64": "npm:3.0.0-alpha.4"
"@parcel/parcel3-linux-x64-musl": "npm:3.0.0-alpha.4"
"@parcel/parcel3-win32-arm64": "npm:3.0.0-alpha.4"
"@parcel/parcel3-win32-x64": "npm:3.0.0-alpha.4"
dependenciesMeta:
"@parcel/parcel3-darwin-arm64":
optional: true
Expand All @@ -5265,7 +5265,7 @@ __metadata:
optional: true
bin:
parcel3: bin/parcel3
checksum: 10c0/a77b2c92529917083f9c8c60c15f97e862139c300b4ae1c0a57bdbd6e87b2fd35a6d7a6354889508f123a79bfc5ee5fa6cf9d8b54fad41682bfb48e0e1f7d04c
checksum: 10c0/4eb05b39124e6a45b41bd7fd830f1cb332aec6307b18addc3efa7251089368fa58e7a0ac072a7c029c3b7b8337597279d17995ea25288335494b44d7e77117b9
languageName: node
linkType: hard

Expand Down Expand Up @@ -25352,7 +25352,7 @@ __metadata:
"@parcel/optimizer-terser": "npm:^2.16.3"
"@parcel/packager-react-static": "npm:^2.16.3"
"@parcel/packager-ts": "npm:^2.16.3"
"@parcel/parcel3": "npm:^3.0.0-alpha.3"
"@parcel/parcel3": "npm:^3.0.0-alpha.4"
"@parcel/reporter-bundle-analyzer": "npm:^2.16.3"
"@parcel/reporter-cli": "npm:^2.16.3"
"@parcel/resolver-glob": "npm:^2.16.3"
Expand Down