From 3af72be0f5386815231490a7caee8dc01b3987af Mon Sep 17 00:00:00 2001 From: Tyagiquamar Date: Tue, 15 Sep 2026 18:27:23 +0530 Subject: [PATCH 1/5] fix: publish source files referenced by source conditional exports --- packages/react-aria-components/package.json | 2 -- packages/react-aria/package.json | 2 -- packages/react-stately/package.json | 2 -- 3 files changed, 6 deletions(-) diff --git a/packages/react-aria-components/package.json b/packages/react-aria-components/package.json index 4d68aa8bf92..0be4d758358 100644 --- a/packages/react-aria-components/package.json +++ b/packages/react-aria-components/package.json @@ -12,9 +12,7 @@ "*", "!docs/**", "!example/**", - "!exports/**", "!intl/**", - "!src/**", "!stories/**", "!test/**" ], diff --git a/packages/react-aria/package.json b/packages/react-aria/package.json index 5b1407fa1a1..ec9ee53e9d0 100644 --- a/packages/react-aria/package.json +++ b/packages/react-aria/package.json @@ -36,9 +36,7 @@ "files": [ "*", "!docs/**", - "!exports/**", "!intl/**", - "!src/**", "!stories/**", "!test/**" ], diff --git a/packages/react-stately/package.json b/packages/react-stately/package.json index b6a6c994c58..f19ccc3d9ab 100644 --- a/packages/react-stately/package.json +++ b/packages/react-stately/package.json @@ -26,9 +26,7 @@ "files": [ "*", "!docs/**", - "!exports/**", "!intl/**", - "!src/**", "!stories/**", "!test/**" ], From 146aef716e61972378a3fcf999df25eb0d1f539f Mon Sep 17 00:00:00 2001 From: Tyagiquamar Date: Fri, 2 Oct 2026 08:27:29 +0530 Subject: [PATCH 2/5] fix: omit source conditions in published packages via publishConfig --- packages/react-aria-components/package.json | 30 ++++++++++++++++++- packages/react-aria/package.json | 33 +++++++++++++++++++-- packages/react-stately/package.json | 23 ++++++++++++-- 3 files changed, 79 insertions(+), 7 deletions(-) diff --git a/packages/react-aria-components/package.json b/packages/react-aria-components/package.json index 0be4d758358..54fc4633f77 100644 --- a/packages/react-aria-components/package.json +++ b/packages/react-aria-components/package.json @@ -12,7 +12,9 @@ "*", "!docs/**", "!example/**", + "!exports/**", "!intl/**", + "!src/**", "!stories/**", "!test/**" ], @@ -50,7 +52,33 @@ "./private/*": null }, "publishConfig": { - "access": "public" + "access": "public", + "source": null, + "exports": { + ".": { + "types": "./dist/types/exports/index.d.ts", + "import": "./dist/exports/index.mjs", + "require": "./dist/exports/index.cjs" + }, + "./i18n": { + "types": "./i18n/index.d.ts", + "import": "./i18n/index.mjs", + "require": "./i18n/index.js" + }, + "./i18n/*": { + "types": "./i18n/lang.d.ts", + "import": "./i18n/*.mjs", + "require": "./i18n/*.js" + }, + "./package.json": "./package.json", + "./*": { + "types": "./dist/types/exports/*.d.ts", + "legacy-module": "./dist/exports/*.js", + "import": "./dist/exports/*.mjs", + "require": "./dist/exports/*.cjs" + }, + "./private/*": null + } }, "dependencies": { "@internationalized/date": "^3.12.4", diff --git a/packages/react-aria/package.json b/packages/react-aria/package.json index ec9ee53e9d0..349c68ccb9f 100644 --- a/packages/react-aria/package.json +++ b/packages/react-aria/package.json @@ -36,10 +36,40 @@ "files": [ "*", "!docs/**", + "!exports/**", "!intl/**", + "!src/**", "!stories/**", "!test/**" ], + "publishConfig": { + "access": "public", + "source": null, + "exports": { + ".": { + "types": "./dist/types/exports/index.d.ts", + "import": "./dist/exports/index.mjs", + "require": "./dist/exports/index.cjs" + }, + "./i18n": { + "types": "./i18n/index.d.ts", + "import": "./i18n/index.mjs", + "require": "./i18n/index.js" + }, + "./i18n/*": { + "types": "./i18n/lang.d.ts", + "import": "./i18n/*.mjs", + "require": "./i18n/*.js" + }, + "./package.json": "./package.json", + "./*": { + "types": "./dist/types/exports/*.d.ts", + "legacy-module": "./dist/exports/*.js", + "import": "./dist/exports/*.mjs", + "require": "./dist/exports/*.cjs" + } + } + }, "sideEffects": false, "repository": { "type": "git", @@ -66,9 +96,6 @@ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" }, - "publishConfig": { - "access": "public" - }, "targets": { "main": false, "module": false, diff --git a/packages/react-stately/package.json b/packages/react-stately/package.json index f19ccc3d9ab..a9ab1f44e92 100644 --- a/packages/react-stately/package.json +++ b/packages/react-stately/package.json @@ -26,10 +26,30 @@ "files": [ "*", "!docs/**", + "!exports/**", "!intl/**", + "!src/**", "!stories/**", "!test/**" ], + "publishConfig": { + "access": "public", + "source": null, + "exports": { + ".": { + "types": "./dist/types/exports/index.d.ts", + "import": "./dist/exports/index.mjs", + "require": "./dist/exports/index.cjs" + }, + "./package.json": "./package.json", + "./*": { + "types": "./dist/types/exports/*.d.ts", + "legacy-module": "./dist/exports/*.js", + "import": "./dist/exports/*.mjs", + "require": "./dist/exports/*.cjs" + } + } + }, "sideEffects": false, "repository": { "type": "git", @@ -51,9 +71,6 @@ "@babel/core": "^7.24.3", "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" }, - "publishConfig": { - "access": "public" - }, "targets": { "main": false, "module": false, From 87a962213280e10f6d389c0ccdd498a0f8ef474e Mon Sep 17 00:00:00 2001 From: Tyagiquamar Date: Sat, 3 Oct 2026 15:20:05 +0530 Subject: [PATCH 3/5] fix: strip source references when packing published packages --- packages/react-aria-components/package.json | 32 +---- .../test/packing.test.js | 116 ++++++++++++++++++ packages/react-aria/package.json | 69 ++++------- packages/react-stately/package.json | 57 ++++----- scripts/prepareForPublish.js | 30 +++++ scripts/verdaccio-seed.js | 21 +++- 6 files changed, 215 insertions(+), 110 deletions(-) create mode 100644 packages/react-aria-components/test/packing.test.js create mode 100644 scripts/prepareForPublish.js diff --git a/packages/react-aria-components/package.json b/packages/react-aria-components/package.json index 54fc4633f77..68a96e19fbe 100644 --- a/packages/react-aria-components/package.json +++ b/packages/react-aria-components/package.json @@ -52,33 +52,11 @@ "./private/*": null }, "publishConfig": { - "access": "public", - "source": null, - "exports": { - ".": { - "types": "./dist/types/exports/index.d.ts", - "import": "./dist/exports/index.mjs", - "require": "./dist/exports/index.cjs" - }, - "./i18n": { - "types": "./i18n/index.d.ts", - "import": "./i18n/index.mjs", - "require": "./i18n/index.js" - }, - "./i18n/*": { - "types": "./i18n/lang.d.ts", - "import": "./i18n/*.mjs", - "require": "./i18n/*.js" - }, - "./package.json": "./package.json", - "./*": { - "types": "./dist/types/exports/*.d.ts", - "legacy-module": "./dist/exports/*.js", - "import": "./dist/exports/*.mjs", - "require": "./dist/exports/*.cjs" - }, - "./private/*": null - } + "access": "public" + }, + "scripts": { + "prepack": "node ../../scripts/prepareForPublish.js prepare", + "postpack": "node ../../scripts/prepareForPublish.js restore" }, "dependencies": { "@internationalized/date": "^3.12.4", diff --git a/packages/react-aria-components/test/packing.test.js b/packages/react-aria-components/test/packing.test.js new file mode 100644 index 00000000000..a09673d6fd8 --- /dev/null +++ b/packages/react-aria-components/test/packing.test.js @@ -0,0 +1,116 @@ +const fs = require('fs'); +const os = require('os'); +const path = require('path'); +const {execFileSync} = require('child_process'); +const tar = require('tar'); + +const root = path.resolve(__dirname, '../../..'); +const yarn = path.join(root, '.yarn/releases/yarn-4.18.0.cjs'); +const helper = path.join(root, 'scripts/prepareForPublish.js'); +const names = ['react-aria', 'react-stately', 'react-aria-components']; +let fixture; +const originals = new Map(); + +beforeAll(() => { + fixture = fs.mkdtempSync(path.join(os.tmpdir(), 'spectrum-pack-')); + fs.writeFileSync( + path.join(fixture, 'package.json'), + JSON.stringify({private: true, workspaces: ['packages/*']}) + ); + for (let name of names) { + let manifest = JSON.parse(fs.readFileSync(path.join(root, 'packages', name, 'package.json'))); + delete manifest.dependencies; + delete manifest.devDependencies; + delete manifest.peerDependencies; + manifest.scripts = { + prepack: `node "${helper}" prepare`, + postpack: `node "${helper}" restore` + }; + let dir = path.join(fixture, 'packages', name); + fs.mkdirSync(path.join(dir, 'exports'), {recursive: true}); + fs.mkdirSync(path.join(dir, 'src')); + fs.mkdirSync(path.join(dir, 'dist/exports'), {recursive: true}); + fs.writeFileSync(path.join(dir, 'exports/index.ts'), 'export const source = true;'); + fs.writeFileSync(path.join(dir, 'src/index.ts'), 'export const source = true;'); + fs.writeFileSync(path.join(dir, 'dist/exports/index.mjs'), 'export const built = true;'); + let contents = JSON.stringify(manifest, null, 2) + '\n'; + originals.set(name, contents); + fs.writeFileSync(path.join(dir, 'package.json'), contents); + } + execFileSync(process.execPath, [yarn, 'install', '--mode=skip-build'], { + cwd: fixture, + stdio: 'inherit' + }); +}, 120000); + +afterAll(() => { + fs.rmSync(fixture, {recursive: true, force: true}); +}); + +async function checkArchive(name, archive) { + let entries = []; + await tar.list({file: archive, onReadEntry: entry => entries.push(entry.path)}); + expect(entries.some(entry => /^package\/(src|exports)\//.test(entry))).toBe(false); + let destination = fs.mkdtempSync(path.join(fixture, 'unpacked-')); + await tar.extract({file: archive, cwd: destination}); + let manifest = JSON.parse(fs.readFileSync(path.join(destination, 'package/package.json'))); + let original = JSON.parse(originals.get(name)); + expect(manifest.source).toBeUndefined(); + for (let [key, conditions] of Object.entries(original.exports)) { + if (conditions && typeof conditions === 'object') { + let expected = {...conditions}; + delete expected.source; + expect(manifest.exports[key]).toEqual(expected); + } else { + expect(manifest.exports[key]).toEqual(conditions); + } + } + expect(fs.readFileSync(path.join(fixture, 'packages', name, 'package.json'), 'utf8')).toBe( + originals.get(name) + ); + expect( + fs.existsSync(path.join(fixture, 'packages', name, 'exports/.package-json-before-pack')) + ).toBe(false); +} + +test.each(names)( + 'npm packing %s omits source references and restores local resolution', + async name => { + let dir = path.join(fixture, 'packages', name); + execFileSync('npm', ['pack', '--pack-destination', dir], {cwd: dir}); + let archive = fs.readdirSync(dir).find(file => file.endsWith('.tgz')); + await checkArchive(name, path.join(dir, archive)); + fs.unlinkSync(path.join(dir, archive)); + }, + 120000 +); + +test.each(names)( + 'Yarn packing %s omits source references and restores local resolution', + async name => { + let dir = path.join(fixture, 'packages', name); + let archive = path.join(fixture, `${name}-yarn.tgz`); + execFileSync(process.execPath, [yarn, 'pack', '--out', archive], {cwd: dir}); + await checkArchive(name, archive); + }, + 120000 +); + +test('direct Verdaccio seeding strips source in tarballs and registry manifests', async () => { + let storage = path.join(fixture, 'storage'); + let input = names.map(name => JSON.stringify({name, location: `packages/${name}`})).join('\n'); + execFileSync(process.execPath, [path.join(root, 'scripts/verdaccio-seed.js'), storage], { + cwd: fixture, + input + }); + for (let name of names) { + let dir = path.join(storage, name); + let archive = fs.readdirSync(dir).find(file => file.endsWith('.tgz')); + await checkArchive(name, path.join(dir, archive)); + let registry = JSON.parse(fs.readFileSync(path.join(dir, 'package.json'))); + let manifest = Object.values(registry.versions)[0]; + expect(manifest.source).toBeUndefined(); + expect(manifest.exports['.'].source).toBeUndefined(); + expect(manifest.exports['./*'].source).toBeUndefined(); + } +}, 120000); diff --git a/packages/react-aria/package.json b/packages/react-aria/package.json index 349c68ccb9f..0b3c3714ab2 100644 --- a/packages/react-aria/package.json +++ b/packages/react-aria/package.json @@ -3,8 +3,24 @@ "version": "3.52.1", "description": "Spectrum UI components in React", "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/adobe/react-spectrum" + }, + "source": "exports/index.ts", + "files": [ + "*", + "!docs/**", + "!exports/**", + "!intl/**", + "!src/**", + "!stories/**", + "!test/**" + ], + "sideEffects": false, "main": "./dist/exports/index.cjs", "module": "./dist/exports/index.js", + "types": "./dist/types/exports/index.d.ts", "exports": { ".": { "source": "./exports/index.ts", @@ -31,49 +47,12 @@ "require": "./dist/exports/*.cjs" } }, - "types": "./dist/types/exports/index.d.ts", - "source": "exports/index.ts", - "files": [ - "*", - "!docs/**", - "!exports/**", - "!intl/**", - "!src/**", - "!stories/**", - "!test/**" - ], "publishConfig": { - "access": "public", - "source": null, - "exports": { - ".": { - "types": "./dist/types/exports/index.d.ts", - "import": "./dist/exports/index.mjs", - "require": "./dist/exports/index.cjs" - }, - "./i18n": { - "types": "./i18n/index.d.ts", - "import": "./i18n/index.mjs", - "require": "./i18n/index.js" - }, - "./i18n/*": { - "types": "./i18n/lang.d.ts", - "import": "./i18n/*.mjs", - "require": "./i18n/*.js" - }, - "./package.json": "./package.json", - "./*": { - "types": "./dist/types/exports/*.d.ts", - "legacy-module": "./dist/exports/*.js", - "import": "./dist/exports/*.mjs", - "require": "./dist/exports/*.cjs" - } - } + "access": "public" }, - "sideEffects": false, - "repository": { - "type": "git", - "url": "https://github.com/adobe/react-spectrum" + "scripts": { + "prepack": "node ../../scripts/prepareForPublish.js prepare", + "postpack": "node ../../scripts/prepareForPublish.js restore" }, "dependencies": { "@internationalized/date": "^3.12.4", @@ -86,16 +65,16 @@ "react-stately": "3.50.0", "use-sync-external-store": "^1.6.0" }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", - "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" - }, "devDependencies": { "@babel/cli": "^7.24.1", "@babel/core": "^7.24.3", "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", + "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + }, "targets": { "main": false, "module": false, diff --git a/packages/react-stately/package.json b/packages/react-stately/package.json index a9ab1f44e92..66bd3d98998 100644 --- a/packages/react-stately/package.json +++ b/packages/react-stately/package.json @@ -3,8 +3,24 @@ "version": "3.50.0", "description": "Spectrum UI components in React", "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/adobe/react-spectrum" + }, + "source": "exports/index.ts", + "files": [ + "*", + "!docs/**", + "!exports/**", + "!intl/**", + "!src/**", + "!stories/**", + "!test/**" + ], + "sideEffects": false, "main": "./dist/exports/index.cjs", "module": "./dist/exports/index.js", + "types": "./dist/types/exports/index.d.ts", "exports": { ".": { "source": "./exports/index.ts", @@ -21,39 +37,12 @@ "require": "./dist/exports/*.cjs" } }, - "types": "./dist/types/exports/index.d.ts", - "source": "exports/index.ts", - "files": [ - "*", - "!docs/**", - "!exports/**", - "!intl/**", - "!src/**", - "!stories/**", - "!test/**" - ], "publishConfig": { - "access": "public", - "source": null, - "exports": { - ".": { - "types": "./dist/types/exports/index.d.ts", - "import": "./dist/exports/index.mjs", - "require": "./dist/exports/index.cjs" - }, - "./package.json": "./package.json", - "./*": { - "types": "./dist/types/exports/*.d.ts", - "legacy-module": "./dist/exports/*.js", - "import": "./dist/exports/*.mjs", - "require": "./dist/exports/*.cjs" - } - } + "access": "public" }, - "sideEffects": false, - "repository": { - "type": "git", - "url": "https://github.com/adobe/react-spectrum" + "scripts": { + "prepack": "node ../../scripts/prepareForPublish.js prepare", + "postpack": "node ../../scripts/prepareForPublish.js restore" }, "dependencies": { "@internationalized/date": "^3.12.4", @@ -63,14 +52,14 @@ "@swc/helpers": "^0.5.0", "use-sync-external-store": "^1.6.0" }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" - }, "devDependencies": { "@babel/cli": "^7.24.1", "@babel/core": "^7.24.3", "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + }, "targets": { "main": false, "module": false, diff --git a/scripts/prepareForPublish.js b/scripts/prepareForPublish.js new file mode 100644 index 00000000000..7dd383bcf1b --- /dev/null +++ b/scripts/prepareForPublish.js @@ -0,0 +1,30 @@ +'use strict'; + +const fs = require('fs'); +const path = require('path'); + +function prepare(dir) { + let manifestPath = path.join(dir, 'package.json'); + let contents = fs.readFileSync(manifestPath, 'utf8'); + let manifest = JSON.parse(contents); + fs.writeFileSync(path.join(dir, 'exports', '.package-json-before-pack'), contents, {flag: 'wx'}); + delete manifest.source; + for (let conditions of Object.values(manifest.exports)) { + if (conditions && typeof conditions === 'object') { + delete conditions.source; + } + } + fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2) + '\n'); +} + +function restore(dir) { + let backup = path.join(dir, 'exports', '.package-json-before-pack'); + fs.writeFileSync(path.join(dir, 'package.json'), fs.readFileSync(backup)); + fs.unlinkSync(backup); +} + +module.exports = {prepare, restore}; + +if (require.main === module) { + module.exports[process.argv[2]](process.cwd()); +} diff --git a/scripts/verdaccio-seed.js b/scripts/verdaccio-seed.js index b8a5c777a6e..45759a9cd41 100644 --- a/scripts/verdaccio-seed.js +++ b/scripts/verdaccio-seed.js @@ -19,6 +19,7 @@ const path = require('path'); const crypto = require('crypto'); const packlist = require('npm-packlist'); const tar = require('tar'); +const {prepare, restore} = require('./prepareForPublish'); const REGISTRY = process.env.SEED_REGISTRY || 'http://localhost:4000'; const CONCURRENCY = Number(process.env.SEED_CONCURRENCY) || 16; @@ -40,7 +41,7 @@ function tarballBuffer(dir, files) { async function seedOne(storagePath, location) { const dir = path.resolve(process.cwd(), location); - const manifest = JSON.parse(fs.readFileSync(path.join(dir, 'package.json'), 'utf8')); + let manifest = JSON.parse(fs.readFileSync(path.join(dir, 'package.json'), 'utf8')); if (manifest.private) { return null; } @@ -49,8 +50,20 @@ async function seedOne(storagePath, location) { throw new Error(`Workspace at ${location} is missing name or version`); } - const files = await packlist({path: dir}); - const buf = await tarballBuffer(dir, files); + const stripSource = manifest.files?.includes('!exports/**') && manifest.exports?.['.']?.source; + let buf; + if (stripSource) { + prepare(dir); + } + try { + manifest = JSON.parse(fs.readFileSync(path.join(dir, 'package.json'), 'utf8')); + const files = await packlist({path: dir}); + buf = await tarballBuffer(dir, files); + } finally { + if (stripSource) { + restore(dir); + } + } const shasum = crypto.createHash('sha1').update(buf).digest('hex'); const integrity = 'sha512-' + crypto.createHash('sha512').update(buf).digest('base64'); @@ -126,7 +139,7 @@ async function main() { if (fs.existsSync(dbPath)) { try { db = JSON.parse(fs.readFileSync(dbPath, 'utf8')); - } catch (e) { + } catch { // corrupt/empty db, start fresh } } From ea33b589b783c31a24f7772dcb4b2f9b807bed1d Mon Sep 17 00:00:00 2001 From: Tyagiquamar Date: Tue, 6 Oct 2026 14:28:11 +0530 Subject: [PATCH 4/5] chore: restore original manifest key order to minimize diff --- packages/react-aria/package.json | 42 ++++++++++++++--------------- packages/react-stately/package.json | 40 +++++++++++++-------------- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/packages/react-aria/package.json b/packages/react-aria/package.json index 0b3c3714ab2..50e83a5caf5 100644 --- a/packages/react-aria/package.json +++ b/packages/react-aria/package.json @@ -3,24 +3,8 @@ "version": "3.52.1", "description": "Spectrum UI components in React", "license": "Apache-2.0", - "repository": { - "type": "git", - "url": "https://github.com/adobe/react-spectrum" - }, - "source": "exports/index.ts", - "files": [ - "*", - "!docs/**", - "!exports/**", - "!intl/**", - "!src/**", - "!stories/**", - "!test/**" - ], - "sideEffects": false, "main": "./dist/exports/index.cjs", "module": "./dist/exports/index.js", - "types": "./dist/types/exports/index.d.ts", "exports": { ".": { "source": "./exports/index.ts", @@ -47,8 +31,21 @@ "require": "./dist/exports/*.cjs" } }, - "publishConfig": { - "access": "public" + "types": "./dist/types/exports/index.d.ts", + "source": "exports/index.ts", + "files": [ + "*", + "!docs/**", + "!exports/**", + "!intl/**", + "!src/**", + "!stories/**", + "!test/**" + ], + "sideEffects": false, + "repository": { + "type": "git", + "url": "https://github.com/adobe/react-spectrum" }, "scripts": { "prepack": "node ../../scripts/prepareForPublish.js prepare", @@ -65,15 +62,18 @@ "react-stately": "3.50.0", "use-sync-external-store": "^1.6.0" }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", + "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + }, "devDependencies": { "@babel/cli": "^7.24.1", "@babel/core": "^7.24.3", "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", - "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + "publishConfig": { + "access": "public" }, "targets": { "main": false, diff --git a/packages/react-stately/package.json b/packages/react-stately/package.json index 66bd3d98998..f3bc30eb477 100644 --- a/packages/react-stately/package.json +++ b/packages/react-stately/package.json @@ -3,24 +3,8 @@ "version": "3.50.0", "description": "Spectrum UI components in React", "license": "Apache-2.0", - "repository": { - "type": "git", - "url": "https://github.com/adobe/react-spectrum" - }, - "source": "exports/index.ts", - "files": [ - "*", - "!docs/**", - "!exports/**", - "!intl/**", - "!src/**", - "!stories/**", - "!test/**" - ], - "sideEffects": false, "main": "./dist/exports/index.cjs", "module": "./dist/exports/index.js", - "types": "./dist/types/exports/index.d.ts", "exports": { ".": { "source": "./exports/index.ts", @@ -37,8 +21,21 @@ "require": "./dist/exports/*.cjs" } }, - "publishConfig": { - "access": "public" + "types": "./dist/types/exports/index.d.ts", + "source": "exports/index.ts", + "files": [ + "*", + "!docs/**", + "!exports/**", + "!intl/**", + "!src/**", + "!stories/**", + "!test/**" + ], + "sideEffects": false, + "repository": { + "type": "git", + "url": "https://github.com/adobe/react-spectrum" }, "scripts": { "prepack": "node ../../scripts/prepareForPublish.js prepare", @@ -52,13 +49,16 @@ "@swc/helpers": "^0.5.0", "use-sync-external-store": "^1.6.0" }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + }, "devDependencies": { "@babel/cli": "^7.24.1", "@babel/core": "^7.24.3", "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + "publishConfig": { + "access": "public" }, "targets": { "main": false, From a2b920e8ff80ca6582c7fc65bf0d5f29e93084fd Mon Sep 17 00:00:00 2001 From: Tyagiquamar Date: Thu, 8 Oct 2026 10:37:27 +0530 Subject: [PATCH 5/5] test: allow the packing fixture to create its lockfile in CI --- packages/react-aria-components/test/packing.test.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-aria-components/test/packing.test.js b/packages/react-aria-components/test/packing.test.js index a09673d6fd8..58c6f76e1a4 100644 --- a/packages/react-aria-components/test/packing.test.js +++ b/packages/react-aria-components/test/packing.test.js @@ -39,6 +39,7 @@ beforeAll(() => { } execFileSync(process.execPath, [yarn, 'install', '--mode=skip-build'], { cwd: fixture, + env: {...process.env, YARN_ENABLE_IMMUTABLE_INSTALLS: 'false'}, stdio: 'inherit' }); }, 120000);