Skip to content

Commit 951f53a

Browse files
committed
Small step to prepare for native node glob support, and test waters of dep hygiene
1 parent ee2f2c4 commit 951f53a

File tree

9 files changed

+681
-1625
lines changed

9 files changed

+681
-1625
lines changed

.config/rollup.base.config.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import replace from '@rollup/plugin-replace'
77
import { nodeResolve } from '@rollup/plugin-node-resolve'
88
import rangesIntersect from 'semver/ranges/intersects.js'
99
import { readPackageUpSync } from 'read-package-up'
10+
import { purgePolyfills } from 'unplugin-purge-polyfills'
1011

1112
import { loadJSON } from '../scripts/files.js'
1213
import {
@@ -137,6 +138,9 @@ export default (extendConfig = {}) => {
137138
babelConfig,
138139
tsconfig: tsconfigPath
139140
}),
141+
purgePolyfills.rollup({
142+
replacements: {}
143+
}),
140144
// Convert un-prefixed built-in imports into "node:"" prefixed forms.
141145
replace({
142146
delimiters: ['(?<=(?:require\\(|from\\s*)["\'])', '(?=["\'])'],

.dep-stats.json

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"chalk-table": "^1.0.2",
99
"hpagent": "^1.2.0",
1010
"ignore": "^5.3.1",
11-
"ignore-by-default": "^2.1.0",
1211
"pacote": "^18.0.6",
1312
"pony-cause": "^2.1.11",
1413
"synp": "^1.9.13",
@@ -31,15 +30,15 @@
3130
"default-browser": "^5.2.1",
3231
"default-browser-id": "^5.0.0",
3332
"define-lazy-prop": "^3.0.0",
34-
"dot-prop": "^6.0.1",
33+
"dot-prop": "^9.0.0",
3534
"escape-goat": "^4.0.0",
3635
"execa": "^9.3.0",
3736
"figures": "^6.1.0",
3837
"get-east-asian-width": "^1.0.0",
3938
"get-stream": "^9.0.0",
4039
"global-directory": "^4.0.1",
4140
"globby": "^14.0.2",
42-
"human-signals": "^7.0.0",
41+
"human-signals": "^8.0.0",
4342
"is-docker": "^3.0.0",
4443
"is-in-ci": "^1.0.0",
4544
"is-inside-container": "^1.0.0",
@@ -94,15 +93,14 @@
9493
"cli-boxes": "^3.0.0",
9594
"cli-spinners": "^2.9.2",
9695
"cross-spawn": "^7.0.3",
97-
"dot-prop": "^6.0.1",
96+
"dot-prop": "^9.0.0",
9897
"eastasianwidth": "^0.2.0",
9998
"emoji-regex": "^10.3.0",
10099
"fast-glob": "^3.3.2",
101100
"graceful-fs": "^4.2.6",
102101
"hpagent": "^1.2.0",
103102
"ignore": "^5.3.1",
104-
"ignore-by-default": "^2.1.0",
105-
"ini": "4.1.1",
103+
"ini": "4.1.3",
106104
"onetime": "^5.1.0",
107105
"pacote": "^18.0.6",
108106
"pony-cause": "^2.1.11",
@@ -113,26 +111,26 @@
113111
"supports-hyperlinks": "^2.2.0",
114112
"synp": "^1.9.13",
115113
"which": "^4.0.0",
116-
"write-file-atomic": "^3.0.3",
114+
"write-file-atomic": "^5.0.1",
117115
"yargs-parser": "^21.1.1"
118116
},
119117
"transitives": {
120118
"ansi-align": "^3.0.1",
121119
"cli-boxes": "^3.0.0",
122120
"cli-spinners": "^2.9.2",
123121
"cross-spawn": "^7.0.3",
124-
"dot-prop": "^6.0.1",
122+
"dot-prop": "^9.0.0",
125123
"eastasianwidth": "^0.2.0",
126124
"emoji-regex": "^10.3.0",
127125
"fast-glob": "^3.3.2",
128126
"graceful-fs": "^4.2.6",
129-
"ini": "4.1.1",
127+
"ini": "4.1.3",
130128
"onetime": "^5.1.0",
131129
"rc": "1.2.8",
132130
"registry-auth-token": "^5.0.2",
133131
"semver": "^7.6.2",
134132
"signal-exit": "^4.1.0",
135133
"supports-hyperlinks": "^2.2.0",
136-
"write-file-atomic": "^3.0.3"
134+
"write-file-atomic": "^5.0.1"
137135
}
138136
}

.eslintrc.js

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@ const { ignores } = includeIgnoreFile(path.join(__dirname, '.gitignore'))
88

99
module.exports = {
1010
ignorePatterns: ignores,
11-
extends: ['@socketsecurity', 'plugin:import/typescript', 'prettier'],
11+
extends: [
12+
'@socketsecurity',
13+
'plugin:import/typescript',
14+
'plugin:depend/recommended',
15+
'prettier'
16+
],
1217
parserOptions: {
1318
project: ['./tsconfig.json'],
1419
EXPERIMENTAL_useProjectService: {
@@ -20,11 +25,10 @@ module.exports = {
2025
'@typescript-eslint/no-floating-promises': [
2126
'error',
2227
{
23-
ignoreVoid: true,
24-
ignoreIIFE: true
28+
ignoreIIFE: true,
29+
ignoreVoid: true
2530
}
2631
],
27-
'no-warning-comments': ['warn', { terms: ['fixme'] }],
2832
// Returning unawaited promises in a try/catch/finally is dangerous
2933
// (the `catch` won't catch if the promise is rejected, and the `finally`
3034
// won't wait for the promise to resolve). Returning unawaited promises
@@ -33,6 +37,13 @@ module.exports = {
3337
// not awaiting promises *outside* of try/catch/finally, which is not what
3438
// we want), and it's nice to await before returning anyways, since you get
3539
// a slightly more comprehensive stack trace upon promise rejection.
36-
'@typescript-eslint/return-await': ['error', 'always']
40+
'@typescript-eslint/return-await': ['error', 'always'],
41+
'depend/ban-dependencies': [
42+
'warn',
43+
{
44+
allowed: ['globby']
45+
}
46+
],
47+
'no-warning-comments': ['warn', { terms: ['fixme'] }]
3748
}
3849
}

0 commit comments

Comments
 (0)