Skip to content

Commit

Permalink
Merge branch 'main' into sb-7
Browse files Browse the repository at this point in the history
# Conflicts:
#	package.json
#	packages/dev/parcel-packager-ssg/package.json
#	packages/dev/parcel-resolver-build/package.json
#	packages/dev/parcel-resolver-docs/package.json
#	packages/dev/parcel-resolver-optimize-locales/package.json
#	packages/dev/parcel-resolver-storybook/package.json
#	packages/dev/parcel-transformer-docs/package.json
#	packages/dev/parcel-transformer-mdx-docs/package.json
#	yarn.lock
  • Loading branch information
snowystinger committed Apr 22, 2024
2 parents c6ed446 + 1d70153 commit 9d5f63f
Show file tree
Hide file tree
Showing 98 changed files with 2,413 additions and 1,504 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
@@ -1,12 +1,16 @@
packages/@react-aria/i18n/server
packages/@spectrum-icons/color/**
packages/@spectrum-icons/ui/**
packages/@spectrum-icons/workflow/**
packages/@spectrum-icons/illustrations/**
packages/@spectrum-icons/express/**
node_modules
packages/*/*/dist
packages/*/*/i18n
packages/react-aria/dist
packages/react-aria/i18n
packages/react-aria-components/dist
packages/react-aria-components/i18n
packages/react-stately/dist
packages/dev/storybook-builder-parcel/preview.js
packages/dev/optimize-locales-plugin/LocalesPlugin.d.ts
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -13,3 +13,5 @@ npm-debug.log
public
storybook-static
test-reports.xml
packages/dev/storybook-builder-parcel/iframe.html
packages/dev/storybook-builder-parcel/preview.js
1 change: 1 addition & 0 deletions .parcelrc-build
@@ -1,6 +1,7 @@
{
"extends": "@parcel/config-default",
"resolvers": ["@parcel/resolver-glob", "parcel-resolver-build", "..."],
"bundler": "@parcel/bundler-library",
"transformers": {
"packages/**/intl/*.json": ["parcel-transformer-intl"],
"bundle-text:*.svg": ["@parcel/transformer-svg", "@parcel/transformer-inline-string"],
Expand Down
8 changes: 0 additions & 8 deletions Makefile
Expand Up @@ -100,14 +100,6 @@ build:
for pkg in packages/@react-{spectrum,aria,stately}/*/ packages/@internationalized/{message,string,date,number}/ packages/@adobe/react-spectrum/ packages/react-aria/ packages/react-stately/ packages/react-aria-components/; \
do node scripts/buildEsm.js $$pkg; \
done
sed -i.bak s/\.js/\.mjs/ packages/@react-aria/i18n/dist/import.mjs
sed -i.bak 's/@react-aria\/i18n/.\/real-main.js/' packages/@react-aria/i18n/dist/useMessageFormatter.js
sed -i.bak 's/@react-aria\/i18n/.\/real-module.js/' packages/@react-aria/i18n/dist/useMessageFormatter.module.js
sed -i.bak 's/@react-aria\/i18n/.\/real-module.mjs/' packages/@react-aria/i18n/dist/useMessageFormatter.module.mjs
rm packages/@react-aria/i18n/dist/import.mjs.bak
rm packages/@react-aria/i18n/dist/useMessageFormatter.js.bak
rm packages/@react-aria/i18n/dist/useMessageFormatter.module.js.bak
rm packages/@react-aria/i18n/dist/useMessageFormatter.module.mjs.bak
node scripts/buildI18n.js

website:
Expand Down
61 changes: 6 additions & 55 deletions examples/next-app/next.config.js
@@ -1,69 +1,20 @@
const localesPlugin = require('@react-aria/optimize-locales-plugin');
const glob = require('glob');

/** @type {import('next').NextConfig} */
const nextConfig = {
webpack(config, {isServer}) {
webpack(config, { isServer }) {
if (!isServer) {
// Don't include any locale strings in the client JS bundle.
config.plugins.push(localesPlugin.webpack({locales: []}));
config.plugins.push(localesPlugin.webpack({ locales: [] }));
}
return config;
},
transpilePackages: [
'@adobe/react-spectrum',
'@react-spectrum/actionbar',
'@react-spectrum/actiongroup',
'@react-spectrum/avatar',
'@react-spectrum/badge',
'@react-spectrum/breadcrumbs',
'@react-spectrum/button',
'@react-spectrum/buttongroup',
'@react-spectrum/calendar',
'@react-spectrum/checkbox',
'@react-spectrum/combobox',
'@react-spectrum/contextualhelp',
'@react-spectrum/datepicker',
'@react-spectrum/dialog',
'@react-spectrum/divider',
'@react-spectrum/dnd',
'@react-spectrum/form',
'@react-spectrum/icon',
'@react-spectrum/illustratedmessage',
'@react-spectrum/inlinealert',
'@react-spectrum/image',
'@react-spectrum/label',
'@react-spectrum/labeledvalue',
'@react-spectrum/layout',
'@react-spectrum/link',
'@react-spectrum/list',
'@react-spectrum/listbox',
'@react-spectrum/menu',
'@react-spectrum/meter',
'@react-spectrum/numberfield',
'@react-spectrum/overlays',
'@react-spectrum/picker',
'@react-spectrum/progress',
'@react-spectrum/provider',
'@react-spectrum/radio',
'@react-spectrum/slider',
'@react-spectrum/searchfield',
'@react-spectrum/statuslight',
'@react-spectrum/switch',
'@react-spectrum/table',
'@react-spectrum/tabs',
'@react-spectrum/tag',
'@react-spectrum/text',
'@react-spectrum/textfield',
'@react-spectrum/theme-dark',
'@react-spectrum/theme-default',
'@react-spectrum/theme-light',
'@react-spectrum/tooltip',
'@react-spectrum/view',
'@react-spectrum/well',
'@spectrum-icons/illustrations',
'@spectrum-icons/ui',
'@spectrum-icons/workflow'
]
'@react-spectrum/*',
'@spectrum-icons/*',
].flatMap(spec => glob.sync(`${spec}`, { cwd: 'node_modules/' })),
}

module.exports = nextConfig
3 changes: 2 additions & 1 deletion examples/next-app/package.json
Expand Up @@ -17,7 +17,8 @@
"typescript": "^5",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18"
"@types/react-dom": "^18",
"glob": "^10.3.12"
},
"workspaces": [
"../../packages/react-aria-components",
Expand Down
2 changes: 1 addition & 1 deletion examples/rac-spectrum-tailwind/package.json
Expand Up @@ -10,7 +10,7 @@
"@adobe/react-spectrum": "^3.28.0",
"@spectrum-icons/illustrations": "^3.6.3",
"@spectrum-icons/workflow": "^4.2.2",
"parcel": "^2.10.2",
"parcel": "2.0.0-canary.1563",
"postcss": "^8.2.1",
"react": "^18.2.0",
"react-aria-components": "^1.0.0-alpha.4",
Expand Down
2 changes: 1 addition & 1 deletion examples/rac-tailwind/package.json
Expand Up @@ -10,7 +10,7 @@
"@heroicons/react": "^2.0.16",
"@react-aria/parcel-resolver-optimize-locales": "^1.0.0",
"framer-motion": "^10.12.16",
"parcel": "^2.10.2",
"parcel": "2.0.0-canary.1563",
"postcss": "^8.4.21",
"react": "^18.2.0",
"react-aria-components": "^1.0.0-alpha.4",
Expand Down
61 changes: 5 additions & 56 deletions examples/rsp-next-ts-17/next.config.js
@@ -1,61 +1,10 @@
const glob = require('glob');

const withTM = require("next-transpile-modules")([
'@adobe/react-spectrum',
'@react-spectrum/actionbar',
'@react-spectrum/actiongroup',
'@react-spectrum/avatar',
'@react-spectrum/badge',
'@react-spectrum/breadcrumbs',
'@react-spectrum/button',
'@react-spectrum/buttongroup',
'@react-spectrum/calendar',
'@react-spectrum/checkbox',
'@react-spectrum/color',
'@react-spectrum/combobox',
'@react-spectrum/contextualhelp',
'@react-spectrum/datepicker',
'@react-spectrum/dialog',
'@react-spectrum/divider',
'@react-spectrum/dnd',
'@react-spectrum/form',
'@react-spectrum/icon',
'@react-spectrum/illustratedmessage',
'@react-spectrum/image',
'@react-spectrum/inlinealert',
'@react-spectrum/label',
'@react-spectrum/labeledvalue',
'@react-spectrum/layout',
'@react-spectrum/link',
'@react-spectrum/list',
'@react-spectrum/listbox',
'@react-spectrum/menu',
'@react-spectrum/meter',
'@react-spectrum/numberfield',
'@react-spectrum/overlays',
'@react-spectrum/picker',
'@react-spectrum/progress',
'@react-spectrum/provider',
'@react-spectrum/radio',
'@react-spectrum/slider',
'@react-spectrum/searchfield',
'@react-spectrum/statuslight',
'@react-spectrum/switch',
'@react-spectrum/table',
'@react-spectrum/tabs',
'@react-spectrum/tag',
'@react-spectrum/text',
'@react-spectrum/textfield',
'@react-spectrum/theme-dark',
'@react-spectrum/theme-default',
'@react-spectrum/theme-light',
'@react-spectrum/tooltip',
'@react-spectrum/toast',
'@react-spectrum/view',
'@react-spectrum/well',
'@spectrum-icons/illustrations',
'@spectrum-icons/ui',
'@spectrum-icons/workflow',
'@spectrum-icons/express'
]);
'@react-spectrum/*',
'@spectrum-icons/*',
].flatMap(spec => glob.sync(`${spec}`, { cwd: 'node_modules/' })));

module.exports = withTM({
basePath:
Expand Down
1 change: 1 addition & 0 deletions examples/rsp-next-ts-17/package.json
Expand Up @@ -17,6 +17,7 @@
"@react-spectrum/toast": "^3.0.0-alpha.0",
"@spectrum-icons/illustrations": "^3.5.0",
"@spectrum-icons/workflow": "^4.0.3",
"glob": "^10.3.12",
"next": "^12",
"next-transpile-modules": "^10.0.0",
"react": "^17",
Expand Down
64 changes: 6 additions & 58 deletions examples/rsp-next-ts/next.config.mjs
@@ -1,71 +1,19 @@
import localesPlugin from '@react-aria/optimize-locales-plugin';
import {glob} from 'glob';

export default {
transpilePackages: [
'@adobe/react-spectrum',
'@react-spectrum/actionbar',
'@react-spectrum/actiongroup',
'@react-spectrum/avatar',
'@react-spectrum/badge',
'@react-spectrum/breadcrumbs',
'@react-spectrum/button',
'@react-spectrum/buttongroup',
'@react-spectrum/calendar',
'@react-spectrum/checkbox',
'@react-spectrum/color',
'@react-spectrum/combobox',
'@react-spectrum/contextualhelp',
'@react-spectrum/datepicker',
'@react-spectrum/dialog',
'@react-spectrum/divider',
'@react-spectrum/dnd',
'@react-spectrum/form',
'@react-spectrum/icon',
'@react-spectrum/illustratedmessage',
'@react-spectrum/image',
'@react-spectrum/inlinealert',
'@react-spectrum/label',
'@react-spectrum/labeledvalue',
'@react-spectrum/layout',
'@react-spectrum/link',
'@react-spectrum/list',
'@react-spectrum/listbox',
'@react-spectrum/menu',
'@react-spectrum/meter',
'@react-spectrum/numberfield',
'@react-spectrum/overlays',
'@react-spectrum/picker',
'@react-spectrum/progress',
'@react-spectrum/provider',
'@react-spectrum/radio',
'@react-spectrum/slider',
'@react-spectrum/searchfield',
'@react-spectrum/statuslight',
'@react-spectrum/switch',
'@react-spectrum/table',
'@react-spectrum/tabs',
'@react-spectrum/tag',
'@react-spectrum/text',
'@react-spectrum/textfield',
'@react-spectrum/theme-dark',
'@react-spectrum/theme-default',
'@react-spectrum/theme-light',
'@react-spectrum/tooltip',
'@react-spectrum/toast',
'@react-spectrum/view',
'@react-spectrum/well',
'@spectrum-icons/illustrations',
'@spectrum-icons/ui',
'@spectrum-icons/workflow',
'@spectrum-icons/express'
],
'@react-spectrum/*',
'@spectrum-icons/*',
].flatMap(spec => glob.sync(`${spec}`, { cwd: 'node_modules/' })),
basePath:
process.env.VERDACCIO && process.env.CIRCLE_SHA1
? `/reactspectrum/${process.env.CIRCLE_SHA1}/verdaccio/next`
: "",
webpack(config, {isServer}) {
webpack(config, { isServer }) {
if (!isServer) {
config.plugins.push(localesPlugin.webpack({locales: []}));
config.plugins.push(localesPlugin.webpack({ locales: [] }));
}
return config;
}
Expand Down
1 change: 1 addition & 0 deletions examples/rsp-next-ts/package.json
Expand Up @@ -19,6 +19,7 @@
"@react-spectrum/toast": "^3.0.0-alpha.0",
"@spectrum-icons/illustrations": "^3.5.0",
"@spectrum-icons/workflow": "^4.0.3",
"glob": "^10.3.12",
"next": "^13.4.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand Down
23 changes: 21 additions & 2 deletions jest.config.js
Expand Up @@ -169,7 +169,7 @@ module.exports = {
testPathIgnorePatterns: [
'/node_modules/',
'\\.ssr\\.test\\.[tj]sx?$'
]
],

// The regexp pattern or array of patterns that Jest uses to detect test files
// testRegex: [],
Expand All @@ -187,7 +187,26 @@ module.exports = {
// timers: "real",

// A map from regular expressions to paths to transformers
// transform: null,
transform: {
'^.+\\.(t|j)sx?$': [
'@swc/jest',
{
jsc: {
parser: {
syntax: 'typescript',
tsx: true,
importAssertions: true
},

transform: {
react: {
runtime: 'automatic'
}
}
}
}
]
},

// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
// transformIgnorePatterns: [
Expand Down
23 changes: 22 additions & 1 deletion jest.ssr.config.js
Expand Up @@ -47,5 +47,26 @@ module.exports = {
// The glob patterns Jest uses to detect test files
testMatch: [
'**/packages/**/*.ssr.test.[tj]s?(x)'
]
],

transform: {
'^.+\\.(t|j)sx?$': [
'@swc/jest',
{
jsc: {
parser: {
syntax: 'typescript',
tsx: true,
importAssertions: true
},

transform: {
react: {
runtime: 'automatic'
}
}
}
}
]
},
};

0 comments on commit 9d5f63f

Please sign in to comment.