Skip to content

Commit 5a9dbb1

Browse files
committed
chore: remove dead dependencies and update some
1 parent 5ede892 commit 5a9dbb1

18 files changed

+96
-243
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.DS_Store
22
.cache
33
.idea
4-
.nyc_output
54
.package-lock.json
65
.parcel-cache
76
build-storybook.log

.nycrc

Lines changed: 0 additions & 8 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -77,32 +77,6 @@ Or run the documentation and browse to [http://localhost:1234/](http://localhost
7777
yarn start:docs
7878
```
7979

80-
### Component/Hook scaffolding
81-
If you are looking to contribute a brand new component or Hook in a package that does not exist yet, please run the following command.
82-
```bash
83-
yarn plop
84-
```
85-
This will start a series of cli prompts to determine what template files and folders should be generated to help quick start your contribution.
86-
The prompts are as follows:
87-
88-
1. What type of project are you setting up?
89-
- Select "React Spectrum v3"
90-
91-
2. Scope name(s)
92-
- Select the package scopes that make sense for your contribution (e.g. react-spectrum if you are contributing a component, react-aria for an aria Hook, etc)
93-
94-
3. Package name, all lowercase (e.g. textfield)
95-
96-
4. Component name, please use appropriate uppercase (e.g. TextField)
97-
- If you are contributing a non-component Hook, just enter the name of your Hook.
98-
99-
5. Component css module name, blank if N/A. If unsure, check @adobe/spectrum-css-temp/components for a module containing the desired css (e.g. textfield)
100-
- If you cannot find the component CSS module name in @adobe/spectrum-css-temp/components, feel free to reach out to a team member via GitHub Issues or Discussions.
101-
102-
Upon answering all the prompts, the appropriate package(s) should be generated and ready for modification.
103-
104-
**Note:** With regards to the generated docs files, please feel free to remove them if you won't be contributing docs. If you are contributing docs for a new component or Hook, please submit them in a separate pull request so that we can decide when to deploy them to our docs site.
105-
10680
### Tests
10781
We use [jest](https://jestjs.io/) for unit tests and [react-testing-library](https://testing-library.com/docs/react-testing-library/intro) for rendering and writing assertions. Please make sure you include tests with your pull requests. Our CI will run the tests on PRs as well as the linter and type checker. You can see on each PR whether you have passed all our checks. We split the tests into 2 groups.
10882

@@ -154,7 +128,7 @@ yarn start:docs
154128
Then, open [http://localhost:1234](http://localhost:1234) in your browser.
155129

156130
### Verdaccio
157-
We use [Verdaccio](https://verdaccio.org/) to set up a private registry for our packages to test our components in our example apps.
131+
We use [Verdaccio](https://verdaccio.org/) to set up a private registry for our packages to test our components in our example apps.
158132

159133
To run verdaccio, first ensure that your `git status` is clean. If your computer has an Intel chip, add the line `shopt -s globstar extglob` in the `verdaccio.sh` file after line 21. Save and commit these changes under a clear message like "Do not push". If you have an Apple silicon chip, you may skip this step.
160134

babel-esm.config.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@
2323
]
2424
]
2525
},
26-
"cover": {
27-
"plugins": [
28-
"istanbul"
29-
]
30-
},
3126
"production": {
3227
"plugins": [
3328
[

babel.config.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@
2222
]
2323
]
2424
},
25-
"cover": {
26-
"plugins": [
27-
"istanbul"
28-
]
29-
},
3025
"production": {
3126
"plugins": [
3227
[

package.json

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"build:icons": "babel-node --presets @babel/env ./scripts/buildIcons.js",
4545
"clean:icons": "babel-node --presets @babel/env ./scripts/cleanIcons.js",
4646
"postinstall": "patch-package && yarn build:icons",
47-
"plop": "plop --plopfile scripts/plopfile.js",
4847
"chromatic": "NODE_ENV=production CHROMATIC=1 chromatic --project-token $CHROMATIC_PROJECT_TOKEN --build-script-name 'build:chromatic'",
4948
"chromatic:forced-colors": "NODE_ENV=production CHROMATIC=1 chromatic --project-token $CHROMATIC_FC_PROJECT_TOKEN --build-script-name 'build:chromatic-fc'",
5049
"merge:css": "babel-node --presets @babel/env ./scripts/merge-spectrum-css.js",
@@ -140,11 +139,9 @@
140139
"autoprefixer": "^9.6.0",
141140
"axe-core": "^4.6.3",
142141
"axe-playwright": "^1.1.11",
143-
"babel-plugin-istanbul": "^6.0.0",
144142
"babel-plugin-macros": "^3.0.1",
145143
"babel-plugin-react-remove-properties": "^0.3.0",
146144
"babel-plugin-transform-glob-import": "^1.0.1",
147-
"babelify": "^10.0.0",
148145
"chalk": "^4.1.2",
149146
"chromatic": "^13.1.3",
150147
"clsx": "^2.0.0",
@@ -166,8 +163,7 @@
166163
"fast-check": "^2.19.0",
167164
"fast-glob": "^3.1.0",
168165
"fs-extra": "^11.0.0",
169-
"glob": "^8.0.3",
170-
"glob-promise": "^6.0.5",
166+
"glob": "^11.0.3",
171167
"globals": "^15.11.0",
172168
"identity-obj-proxy": "^3.0.0",
173169
"ignore-styles": "^5.0.1",
@@ -182,30 +178,25 @@
182178
"md5": "^2.2.1",
183179
"motion": "^12.23.6",
184180
"npm-cli-login": "^1.0.0",
185-
"nyc": "^10.2.0",
186-
"p-queue": "^6.2.1",
187181
"parcel": "^2.16.0",
188182
"parcel-optimizer-strict-mode": "workspace:^",
189183
"patch-package": "^6.2.0",
190184
"playwright": "^1.45.3",
191-
"plop": "^2.4.0",
192185
"postcss": "^8.4.24",
193186
"postcss-custom-properties": "^13.2.0",
194187
"postcss-import": "^15.1.0",
195188
"prettier": "^3.6.2",
196189
"prop-types": "^15.6.0",
197190
"raf": "^3.4.0",
198191
"react": "^19.1.0",
199-
"react-axe": "^3.0.2",
200192
"react-dom": "^19.1.0",
201193
"react-frame-component": "^5.0.0",
202194
"react-test-renderer": "^19.1.0",
203195
"recast": "^0.23",
204196
"recursive-readdir": "^2.2.2",
205197
"regenerator-runtime": "0.13.3",
206-
"rimraf": "^2.6.3",
198+
"rimraf": "^6.0.1",
207199
"sharp": "^0.33.5",
208-
"sinon": "^7.3.1",
209200
"storybook": "^8.6.14",
210201
"storybook-dark-mode": "^4.0.2",
211202
"storybook-react-parcel": "workspace:^",
@@ -218,8 +209,7 @@
218209
"verdaccio": "^6.0.0",
219210
"walk-object": "^4.0.0",
220211
"wsrun": "^5.0.0",
221-
"xml": "^1.0.1",
222-
"yargs": "^17.2.1"
212+
"xml": "^1.0.1"
223213
},
224214
"resolutions": {
225215
"@babel/cli": "7.24.1",
@@ -230,7 +220,7 @@
230220
"@babel/traverse": "7.24.1",
231221
"@babel/types": "7.24.0",
232222
"@mdx-js/react": "2.0.0-rc.2",
233-
"postcss": "8.4.24",
223+
"postcss": "8.4.31",
234224
"postcss-custom-properties": "13.2.0",
235225
"postcss-import": "15.1.0",
236226
"react-refresh": "0.9.0",

packages/dev/docs/pages/react-spectrum/ssr.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,15 +347,15 @@ To configure Remix to load React Spectrum styles, CSS Side-Effect Imports is req
347347
However, to make it work with SSR, a small amount of configuration is required. Add the following to your `vite.config.js` or `vite.config.ts` file. This will ensure that React Spectrum’s CSS can be built properly.
348348

349349
```tsx
350-
import glob from 'glob';
350+
import {globSync} from 'glob';
351351

352352
export default defineConfig({
353353
ssr: {
354354
noExternal: [
355355
'@adobe/react-spectrum',
356356
'@react-spectrum/*',
357357
'@spectrum-icons/*',
358-
].flatMap((spec) => glob.sync(`${spec}`, { cwd: 'node_modules/' })),
358+
].flatMap((spec) => globSync(`${spec}`, { cwd: 'node_modules/' })),
359359
}
360360
});
361361
```

packages/dev/s2-icon-builder/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"@react-spectrum/parcel-namer-s2": "^0.3.1",
2626
"@react-spectrum/parcel-transformer-s2-icon": "^0.3.1",
2727
"@swc/helpers": "^0.5.0",
28-
"glob": "^8.0.3"
28+
"glob": "^11.0.3"
2929
},
3030
"peerDependencies": {
3131
"@react-spectrum/s2": ">=0.8.0",

scripts/buildBranchAPI.js

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,24 @@ const packageJSON = require('../package.json');
1616
const path = require('path');
1717
const glob = require('fast-glob');
1818
const spawn = require('cross-spawn');
19-
let yargs = require('yargs');
19+
const {parseArgs} = require('util');
2020

2121

22-
let argv = yargs
23-
.option('verbose', {alias: 'v', type: 'boolean'})
24-
.option('output', {alias: 'o', type: 'string'})
25-
.option('githash', {type: 'string'})
26-
.argv;
22+
const args = parseArgs({
23+
options: {
24+
verbose: {
25+
short: 'v',
26+
type: 'boolean'
27+
},
28+
output: {
29+
short: 'o',
30+
type: 'string'
31+
},
32+
githash: {
33+
type: 'string'
34+
}
35+
}
36+
});
2737

2838
build().catch(err => {
2939
console.error(err.stack);
@@ -38,15 +48,15 @@ build().catch(err => {
3848
async function build() {
3949
let backupDir = tempy.directory();
4050
let archiveDir;
41-
if (argv.githash) {
51+
if (args.values.githash) {
4252
archiveDir = tempy.directory();
43-
console.log('checking out archive of', argv.githash, 'into', archiveDir);
44-
await run('sh', ['-c', `git archive ${argv.githash} | tar -x -C ${archiveDir}`], {stdio: 'inherit'});
53+
console.log('checking out archive of', args.values.githash, 'into', archiveDir);
54+
await run('sh', ['-c', `git archive ${args.values.githash} | tar -x -C ${archiveDir}`], {stdio: 'inherit'});
4555

4656
await run('sh', ['-c', `git archive HEAD | tar -x -C ${backupDir}`], {stdio: 'inherit'});
4757
}
4858
let srcDir = archiveDir ?? path.join(__dirname, '..');
49-
let distDir = path.join(__dirname, '..', 'dist', argv.output ?? 'branch-api');
59+
let distDir = path.join(__dirname, '..', 'dist', args.values.output ?? 'branch-api');
5060
// if we already have a directory with a built dist, remove it so we can write cleanly into it at the end
5161
fs.removeSync(distDir);
5262
// Create a temp directory to build the site in

scripts/buildPublishedAPI.js

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,21 @@ const packageJSON = require('../package.json');
1616
const path = require('path');
1717
const glob = require('fast-glob');
1818
const spawn = require('cross-spawn');
19-
let yargs = require('yargs');
19+
const {parseArgs} = require('util');
2020

2121

22-
let argv = yargs
23-
.option('verbose', {alias: 'v', type: 'boolean'})
24-
.option('output', {alias: 'o', type: 'string'})
25-
.argv;
22+
const args = parseArgs({
23+
options: {
24+
verbose: {
25+
short: 'v',
26+
type: 'boolean'
27+
},
28+
output: {
29+
short: 'o',
30+
type: 'string'
31+
}
32+
}
33+
});
2634

2735
build().catch(err => {
2836
console.error(err.stack);
@@ -35,7 +43,7 @@ build().catch(err => {
3543
* This is run against a downloaded copy of the last published version of each package into a temporary directory and build there
3644
*/
3745
async function build() {
38-
let distDir = argv.output ?? path.join(__dirname, '..', 'dist', argv.output ?? 'base-api');
46+
let distDir = args.values.output ?? path.join(__dirname, '..', 'dist', args.values.output ?? 'base-api');
3947
// if we already have a directory with a built dist, remove it so we can write cleanly into it at the end
4048
fs.removeSync(distDir);
4149
// Create a temp directory to build the site in
@@ -153,6 +161,7 @@ async function build() {
153161
fs.writeFileSync(path.join(dir, 'package.json'), JSON.stringify(pkg, false, 2));
154162
fs.copySync(path.join(__dirname, '..', '.yarn'), path.join(dir, '.yarn'));
155163
fs.copySync(path.join(__dirname, '..', '.yarnrc.yml'), path.join(dir, '.yarnrc.yml'));
164+
fs.copySync(path.join(__dirname, '..', 'yarn.lock'), path.join(dir, 'yarn.lock'));
156165
fs.copySync(path.join(__dirname, '..', 'packages', '@adobe', 'spectrum-css-builder-temp'), path.join(dir, 'packages', '@adobe', 'spectrum-css-builder-temp'));
157166

158167
// Install dependencies from npm
@@ -229,7 +238,7 @@ function run(cmd, args, opts) {
229238
return new Promise((resolve, reject) => {
230239
let child = spawn(cmd, args, opts);
231240
let result = '';
232-
child.stdout?.on('data', function(data) {
241+
child.stdout?.on('data', function (data) {
233242
result += data.toString();
234243
});
235244
child.on('error', reject);

0 commit comments

Comments
 (0)