Skip to content

Commit c122f52

Browse files
authored
chore: Remove more dead dependencies (#9010)
* chore: remove dead dependencies and update some * turn on verdaccio * update lockfile * attempt building starters outside of the global workspace * finish commit * Revert starter build on wrong branch This reverts commit 202c7ed. * remove all plop templates * delete dead docs * chore: remove more dead dependencies * fix import * move prettier to where it is used, stupid svgr/core * remove need for fs-extra * fix a previous usage of fs-extra * fix another instance * fix buildWebsite * bump some more and remove more unused * Revert "turn on verdaccio" This reverts commit 71030ab. * turn on verdaccio * fix types * remove nyc reference * Revert "turn on verdaccio" This reverts commit 0d97a95. * turn on verdaccio * Revert "turn on verdaccio" This reverts commit 417099d.
1 parent 49bb12c commit c122f52

File tree

19 files changed

+226
-1802
lines changed

19 files changed

+226
-1802
lines changed

examples/rac-spectrum-tailwind/src/components/StarRatingGroup.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { any } from "prop-types";
2-
import { useState } from "react";
1+
import React, { useState } from "react";
32
import {
43
Group,
54
Label,
@@ -31,9 +30,9 @@ export function StarRatingGroup({
3130
let [hoveredRating, setHoveredRating] =
3231
useState<string | undefined>(undefined);
3332

34-
let onPointerOver = (e: any) => {
35-
if (e.target.dataset?.rating) {
36-
setHoveredRating(e.target.dataset.rating);
33+
let onPointerOver = (e: React.PointerEvent<HTMLDivElement>) => {
34+
if ((e.target as HTMLElement).dataset?.rating) {
35+
setHoveredRating((e.target as HTMLElement).dataset.rating);
3736
}
3837
};
3938

package.json

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,13 @@
6969
"packages/*/*"
7070
],
7171
"devDependencies": {
72-
"@actions/core": "^1.1.0",
72+
"@actions/core": "^1.10.0",
7373
"@actions/github": "^1.1.0",
7474
"@babel/cli": "^7.24.1",
7575
"@babel/core": "^7.24.3",
7676
"@babel/eslint-parser": "^7.27.1",
7777
"@babel/node": "^7.23.9",
7878
"@babel/plugin-proposal-decorators": "^7.24.1",
79-
"@babel/plugin-syntax-decorators": "7.24.1",
80-
"@babel/plugin-syntax-import-assertions": "^7.24.1",
8179
"@babel/plugin-transform-runtime": "^7.24.3",
8280
"@babel/preset-env": "^7.24.3",
8381
"@babel/preset-react": "^7.24.1",
@@ -110,8 +108,6 @@
110108
"@spectrum-css/component-builder": "workspace:^",
111109
"@spectrum-css/vars": "^2.3.0",
112110
"@storybook/addon-a11y": "patch:@storybook/addon-a11y@npm%3A8.6.14#~/.yarn/patches/@storybook-addon-a11y-npm-8.6.14-2119c57a0f.patch",
113-
"@storybook/addon-actions": "^8.6.14",
114-
"@storybook/addon-controls": "^8.6.14",
115111
"@storybook/addon-essentials": "^8.6.14",
116112
"@storybook/addon-interactions": "^8.6.14",
117113
"@storybook/addon-jest": "^8.6.14",
@@ -136,7 +132,6 @@
136132
"@types/react-dom": "^19.0.0",
137133
"@yarnpkg/types": "^4.0.0",
138134
"autoprefixer": "^9.6.0",
139-
"axe-core": "^4.6.3",
140135
"axe-playwright": "^1.1.11",
141136
"babel-plugin-macros": "^3.0.1",
142137
"babel-plugin-react-remove-properties": "^0.3.0",
@@ -146,9 +141,8 @@
146141
"clsx": "^2.0.0",
147142
"color-space": "^1.16.0",
148143
"concurrently": "^6.0.2",
149-
"core-js": "^3.0.0",
150144
"cross-env": "^7.0.2",
151-
"cross-spawn": "^7.0.3",
145+
"cross-spawn": "^7.0.5",
152146
"delta-e": "^0.0.8",
153147
"diff": "^5.1.0",
154148
"eslint": "^9.12.0",
@@ -161,7 +155,6 @@
161155
"eslint-plugin-rulesdir": "^0.2.2",
162156
"fast-check": "^2.19.0",
163157
"fast-glob": "^3.1.0",
164-
"fs-extra": "^11.0.0",
165158
"glob": "^11.0.3",
166159
"globals": "^15.11.0",
167160
"identity-obj-proxy": "^3.0.0",
@@ -172,7 +165,6 @@
172165
"jest-junit": "^15.0.0",
173166
"jest-matchmedia-mock": "^1.1.0",
174167
"lerna": "^3.13.2",
175-
"lfcdn": "^0.4.2",
176168
"lucide-react": "^0.517.0",
177169
"md5": "^2.2.1",
178170
"motion": "^12.23.6",
@@ -184,9 +176,6 @@
184176
"postcss": "^8.4.24",
185177
"postcss-custom-properties": "^13.2.0",
186178
"postcss-import": "^15.1.0",
187-
"prettier": "^3.6.2",
188-
"prop-types": "^15.6.0",
189-
"raf": "^3.4.0",
190179
"react": "^19.1.0",
191180
"react-dom": "^19.1.0",
192181
"react-frame-component": "^5.0.0",
@@ -207,7 +196,6 @@
207196
"typescript-eslint": "^8.38.0",
208197
"verdaccio": "^6.0.0",
209198
"walk-object": "^4.0.0",
210-
"wsrun": "^5.0.0",
211199
"xml": "^1.0.1"
212200
},
213201
"resolutions": {

packages/@spectrum-icons/build-tools/generateIcons.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
* governing permissions and limitations under the License.
1111
*/
1212

13-
import fs from 'fs-extra';
13+
import fs from 'fs';
1414
import path from 'path';
1515

1616
function writeToFile(filepath, data) {
1717
let buffer = Buffer.from(data);
18-
fs.writeFile(filepath, buffer);
18+
fs.writeFileSync(filepath, buffer);
1919
}
2020

2121
/**
@@ -26,7 +26,7 @@ function writeToFile(filepath, data) {
2626
* @param template Template for output file, should take a name from the regex.
2727
*/
2828
export function generateIcons(iconDir, outputDir, nameRegex, template) {
29-
fs.ensureDirSync(outputDir);
29+
fs.mkdirSync(outputDir, {recursive: true});
3030
fs.readdir(iconDir, (err, items) => {
3131
let ignoreList = ['index.js', 'util.js'];
3232
// get all icon files

packages/@spectrum-icons/build-tools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"private": true,
1212
"dependencies": {
1313
"@svgr/core": "^8.1.0",
14-
"fs-extra": "^11.0.0"
14+
"prettier": "^3.6.2"
1515
},
1616
"publishConfig": {
1717
"access": "public"

packages/@spectrum-icons/express/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
"@swc/helpers": "^0.5.0"
2828
},
2929
"devDependencies": {
30-
"@spectrum-icons/build-tools": "3.0.0-alpha.1",
31-
"fs-extra": "^11.0.0"
30+
"@spectrum-icons/build-tools": "3.0.0-alpha.1"
3231
},
3332
"peerDependencies": {
3433
"@react-spectrum/provider": "^3.0.0",

packages/dev/codemods/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"@react-types/shared": "^3.32.1",
2929
"@types/node": "^22",
3030
"boxen": "^5.1.2",
31-
"build": "^0.1.4",
3231
"chalk": "^4.0.0",
3332
"execa": "^5.1.1",
3433
"jscodeshift": "^0.15.2",

packages/dev/docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"@spectrum-icons/workflow": "^4.0.0",
2727
"algoliasearch": "^4.14.1",
2828
"clsx": "^2.0.0",
29-
"dompurify": "^2.3.10",
29+
"dompurify": "^3.2.4",
3030
"globals-docs": "^2.4.1",
3131
"highlight.js": "9.18.1",
3232
"markdown-to-jsx": "^6.11.0",

packages/dev/parcel-transformer-mdx-docs/MDXTransformer.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,8 +542,7 @@ export default {};
542542
'globals-docs': false,
543543
lowlight: false,
544544
scheduler: false,
545-
'markdown-to-jsx': false,
546-
'prop-types': false
545+
'markdown-to-jsx': false
547546
},
548547
shouldScopeHoist: false,
549548
shouldOptimize: false

packages/dev/parcel-transformer-s2-icon/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"@parcel/plugin": "^2.0.0",
1111
"@svgr/core": "^8.1.0",
1212
"@svgr/plugin-jsx": "^8.1.0",
13-
"@svgr/plugin-svgo": "^8.1.0"
13+
"@svgr/plugin-svgo": "^8.1.0",
14+
"prettier": "^3.6.2"
1415
},
1516
"rsp": {
1617
"type": "cli"

scripts/buildBranchAPI.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
const tempy = require('tempy');
14-
const fs = require('fs-extra');
14+
const fs = require('fs');
1515
const packageJSON = require('../package.json');
1616
const path = require('path');
1717
const glob = require('fast-glob');
@@ -58,7 +58,7 @@ async function build() {
5858
let srcDir = archiveDir ?? path.join(__dirname, '..');
5959
let distDir = path.join(__dirname, '..', 'dist', args.values.output ?? 'branch-api');
6060
// if we already have a directory with a built dist, remove it so we can write cleanly into it at the end
61-
fs.removeSync(distDir);
61+
fs.rmSync(distDir, {recursive: true, force: true});
6262
// Create a temp directory to build the site in
6363
let dir = tempy.directory();
6464
console.log(`Building branch api into ${dir}...`);
@@ -118,29 +118,29 @@ async function build() {
118118
}`);
119119

120120
// Copy necessary code and configuration over
121-
fs.copySync(path.join(srcDir, 'packages', '@adobe', 'spectrum-css-temp'), path.join(dir, 'packages', '@adobe', 'spectrum-css-temp'));
121+
fs.cpSync(path.join(srcDir, 'packages', '@adobe', 'spectrum-css-temp'), path.join(dir, 'packages', '@adobe', 'spectrum-css-temp'), {recursive: true});
122122
try {
123-
fs.copySync(path.join(srcDir, 'packages', '@adobe', 'spectrum-css-builder-temp'), path.join(dir, 'packages', '@adobe', 'spectrum-css-builder-temp'));
123+
fs.cpSync(path.join(srcDir, 'packages', '@adobe', 'spectrum-css-builder-temp'), path.join(dir, 'packages', '@adobe', 'spectrum-css-builder-temp'), {recursive: true});
124124
} catch (e) {
125-
fs.copySync(path.join(backupDir, 'packages', '@adobe', 'spectrum-css-builder-temp'), path.join(dir, 'packages', '@adobe', 'spectrum-css-builder-temp'));
125+
fs.cpSync(path.join(backupDir, 'packages', '@adobe', 'spectrum-css-builder-temp'), path.join(dir, 'packages', '@adobe', 'spectrum-css-builder-temp'), {recursive: true});
126126
}
127-
fs.copySync(path.join(srcDir, 'postcss.config.js'), path.join(dir, 'postcss.config.js'));
128-
fs.copySync(path.join(srcDir, 'lib'), path.join(dir, 'lib'));
129-
fs.copySync(path.join(srcDir, 'CONTRIBUTING.md'), path.join(dir, 'CONTRIBUTING.md'));
127+
fs.cpSync(path.join(srcDir, 'postcss.config.js'), path.join(dir, 'postcss.config.js'));
128+
fs.cpSync(path.join(srcDir, 'lib'), path.join(dir, 'lib'), {recursive: true});
129+
fs.cpSync(path.join(srcDir, 'CONTRIBUTING.md'), path.join(dir, 'CONTRIBUTING.md'));
130130
// need dev from latest on branch since it will generate the API for diffing, and in older commits it may not be able to do this or
131131
// does it in a different format
132-
fs.copySync(path.join(__dirname, '..', 'packages', 'dev'), path.join(dir, 'packages', 'dev'));
133-
fs.copySync(path.join(__dirname, '..', '.parcelrc'), path.join(dir, '.parcelrc'));
132+
fs.cpSync(path.join(__dirname, '..', 'packages', 'dev'), path.join(dir, 'packages', 'dev'), {recursive: true});
133+
fs.cpSync(path.join(__dirname, '..', '.parcelrc'), path.join(dir, '.parcelrc'));
134134
// Delete test-utils from copied packages since we don't expose anything from there
135-
fs.removeSync(path.join(dir, 'packages', 'dev', 'test-utils'));
135+
fs.rmSync(path.join(dir, 'packages', 'dev', 'test-utils'), {recursive: true, force: true});
136136

137-
fs.copySync(path.join(__dirname, '..', '.yarn'), path.join(dir, '.yarn'));
138-
fs.copySync(path.join(__dirname, '..', '.yarnrc.yml'), path.join(dir, '.yarnrc.yml'));
137+
fs.cpSync(path.join(__dirname, '..', '.yarn'), path.join(dir, '.yarn'), {recursive: true});
138+
fs.cpSync(path.join(__dirname, '..', '.yarnrc.yml'), path.join(dir, '.yarnrc.yml'));
139139

140140
// Only copy babel patch over
141141
let patches = fs.readdirSync(path.join(srcDir, 'patches'));
142142
let babelPatch = patches.find(name => name.startsWith('@babel'));
143-
fs.copySync(path.join(srcDir, 'patches', babelPatch), path.join(dir, 'patches', babelPatch));
143+
fs.cpSync(path.join(srcDir, 'patches', babelPatch), path.join(dir, 'patches', babelPatch), {recursive: true});
144144

145145
let excludeList = ['@react-spectrum/story-utils'];
146146
// Copy packages over to temp dir
@@ -153,7 +153,7 @@ async function build() {
153153
continue;
154154
}
155155

156-
fs.copySync(path.join(srcDir, 'packages', path.dirname(p)), path.join(dir, 'packages', path.dirname(p)), {dereference: true});
156+
fs.cpSync(path.join(srcDir, 'packages', path.dirname(p)), path.join(dir, 'packages', path.dirname(p)), {dereference: true, recursive: true});
157157

158158
if (!p.includes('@react-types')) {
159159
delete json.types;
@@ -169,18 +169,18 @@ async function build() {
169169
}
170170
}
171171
// Install dependencies from npm
172-
fs.copySync(path.join(srcDir, 'yarn.lock'), path.join(dir, 'yarn.lock'));
172+
fs.cpSync(path.join(srcDir, 'yarn.lock'), path.join(dir, 'yarn.lock'));
173173
await run('yarn', ['--no-immutable'], {cwd: dir, stdio: 'inherit'});
174174

175175
// Build the website
176176
console.log('building api files');
177177
await run('yarn', ['parcel', 'build', 'packages/react-aria-components', 'packages/@react-{spectrum,aria,stately}/*/', 'packages/@internationalized/{message,string,date,number}', '--target', 'apiCheck'], {cwd: dir, stdio: 'inherit'});
178178

179179
// Copy the build back into dist, and delete the temp dir.
180-
fs.copySync(path.join(dir, 'packages'), distDir, {dereference: true});
181-
fs.removeSync(dir);
180+
fs.cpSync(path.join(dir, 'packages'), distDir, {dereference: true, recursive: true});
181+
fs.rmSync(dir, {recursive: true, force: true});
182182
if (archiveDir) {
183-
fs.removeSync(archiveDir);
183+
fs.rmSync(archiveDir, {recursive: true, force: true});
184184
}
185185
}
186186

0 commit comments

Comments
 (0)