Skip to content

Commit 07e84ed

Browse files
committed
Update deps and scripts
1 parent ab9c840 commit 07e84ed

31 files changed

+2519
-1838
lines changed

.config/babel.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
const { isEsmId } = require('../scripts/packages')
3+
const { isEsmId } = require('../scripts/utils/packages')
44

55
module.exports = {
66
plugins: [
@@ -13,7 +13,7 @@ module.exports = {
1313
corejs: false,
1414
helpers: true,
1515
regenerator: false,
16-
version: '^7.24.6'
16+
version: '^7.25.7'
1717
}
1818
],
1919
[

.config/rollup.base.config.mjs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import rangesIntersect from 'semver/ranges/intersects.js'
99
import { readPackageUpSync } from 'read-package-up'
1010
import { purgePolyfills } from 'unplugin-purge-polyfills'
1111

12-
import { loadJSON } from '../scripts/files.js'
12+
import { readPackageJsonSync } from '../scripts/utils/fs.js'
1313
import {
1414
getPackageName,
1515
getPackageNameEnd,
@@ -18,8 +18,8 @@ import {
1818
isPackageName,
1919
isBuiltin,
2020
resolveId
21-
} from '../scripts/packages.js'
22-
import { escapeRegExp } from '../scripts/regexps.js'
21+
} from '../scripts/utils/packages.js'
22+
import { escapeRegExp } from '../scripts/utils/regexps.js'
2323
import socketModifyPlugin from '../scripts/rollup/socket-modify-plugin.js'
2424

2525
const __dirname = fileURLToPath(new URL('.', import.meta.url))
@@ -40,9 +40,8 @@ const babelConfigPath = path.join(__dirname, 'babel.config.js')
4040
const tsconfigPath = path.join(__dirname, 'tsconfig.rollup.json')
4141

4242
const babelConfig = require(babelConfigPath)
43-
const { dependencies: pkgDeps, devDependencies: pkgDevDeps } = loadJSON(
44-
path.resolve(rootPath, 'package.json')
45-
)
43+
const { dependencies: pkgDeps, devDependencies: pkgDevDeps } =
44+
readPackageJsonSync(rootPath)
4645

4746
const customResolver = nodeResolve({
4847
exportConditions: ['node'],
@@ -107,7 +106,9 @@ export default (extendConfig = {}) => {
107106
dependencies = {},
108107
optionalDependencies = {},
109108
peerDependencies = {}
110-
} = loadJSON(`${parentId.slice(0, parentNameEnd)}/package.json`)
109+
} = readPackageJsonSync(
110+
`${parentId.slice(0, parentNameEnd)}/package.json`
111+
)
111112
const curRange =
112113
dependencies[name] ??
113114
optionalDependencies[name] ??
@@ -184,6 +185,7 @@ export default (extendConfig = {}) => {
184185
ignoreGlobal: true,
185186
ignoreTryCatch: true,
186187
defaultIsModuleExports: true,
188+
strictRequires: 'auto',
187189
transformMixedEsModules: true,
188190
extensions: ['.cjs', '.js', '.ts', `.ts${ENTRY_SUFFIX}`]
189191
}),

.config/rollup.dist.config.mjs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import { chmodSync, readFileSync, writeFileSync } from 'node:fs'
22
import path from 'node:path'
33
import { fileURLToPath } from 'node:url'
44

5-
import { loadJSON } from '../scripts/files.js'
6-
import { formatObject, hasKeys } from '../scripts/objects.js'
7-
import { toSortedObject } from '../scripts/sorts.js'
5+
import { readJsonSync, readPackageJsonSync } from '../scripts/utils/fs.js'
6+
import { formatObject, hasKeys } from '../scripts/utils/objects.js'
7+
import { toSortedObject } from '../scripts/utils/sorts.js'
88

99
import baseConfig from './rollup.base.config.mjs'
1010

@@ -15,8 +15,8 @@ const depStatsPath = path.join(rootPath, '.dep-stats.json')
1515
const distPath = path.join(rootPath, 'dist')
1616
const srcPath = path.join(rootPath, 'src')
1717

18-
const pkgJSONPath = path.resolve(rootPath, 'package.json')
19-
const pkgJSON = loadJSON(pkgJSONPath)
18+
const pkgJsonPath = path.resolve(rootPath, 'package.json')
19+
const pkgJson = readPackageJsonSync(pkgJsonPath)
2020

2121
export default () => {
2222
const config = baseConfig({
@@ -40,7 +40,7 @@ export default () => {
4040
{
4141
writeBundle() {
4242
const { '@cyclonedx/cdxgen': cdxgenRange, synp: synpRange } =
43-
pkgJSON.dependencies
43+
pkgJson.dependencies
4444
const { depStats } = config.meta
4545

4646
// Manually add @cyclonedx/cdxgen and synp as they are not directly
@@ -52,11 +52,11 @@ export default () => {
5252

5353
try {
5454
// Remove transitives from dependencies
55-
const oldDepStats = loadJSON(depStatsPath)
55+
const oldDepStats = readJsonSync(depStatsPath)
5656
for (const key of Object.keys(oldDepStats.transitives)) {
57-
if (pkgJSON.dependencies[key]) {
58-
depStats.transitives[key] = pkgJSON.dependencies[key]
59-
depStats.external[key] = pkgJSON.dependencies[key]
57+
if (pkgJson.dependencies[key]) {
58+
depStats.transitives[key] = pkgJson.dependencies[key]
59+
depStats.external[key] = pkgJson.dependencies[key]
6060
delete depStats.dependencies[key]
6161
}
6262
}
@@ -78,8 +78,8 @@ export default () => {
7878

7979
// Update dependencies with additional inlined modules
8080
writeFileSync(
81-
pkgJSONPath,
82-
readFileSync(pkgJSONPath, 'utf8').replace(
81+
pkgJsonPath,
82+
readFileSync(pkgJsonPath, 'utf8').replace(
8383
/(?<="dependencies":\s*)\{[^\}]*\}/,
8484
() => {
8585
const deps = {

.dep-stats.json

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
{
22
"dependencies": {
33
"@apideck/better-ajv-errors": "^0.3.6",
4-
"@cyclonedx/cdxgen": "^10.9.8",
5-
"@inquirer/prompts": "^5.5.0",
6-
"@npmcli/promise-spawn": "^8.0.0",
4+
"@cyclonedx/cdxgen": "^10.10.4",
5+
"@inquirer/prompts": "^7.0.0",
6+
"@npmcli/promise-spawn": "^8.0.1",
77
"@socketsecurity/config": "^2.1.3",
88
"@socketsecurity/sdk": "^1.3.0",
99
"blessed": "^0.1.81",
1010
"blessed-contrib": "^4.11.0",
11-
"browserslist": "4.23.3",
11+
"browserslist": "4.24.0",
1212
"chalk-table": "^1.0.2",
1313
"hpagent": "^1.2.0",
14-
"ignore": "^5.3.2",
15-
"pacote": "^18.0.6",
14+
"ignore": "^6.0.2",
15+
"pacote": "^19.0.0",
1616
"pony-cause": "^2.1.11",
1717
"synp": "^1.9.13",
18-
"which": "^4.0.0",
18+
"which": "^5.0.0",
1919
"yargs-parser": "^21.1.1"
2020
},
2121
"devDependencies": {},
2222
"esm": {
23-
"@hyrious/bun.lockb": "^0.0.3",
2423
"@sindresorhus/merge-streams": "^2.1.0",
2524
"ansi-escapes": "^5.0.0",
2625
"ansi-regex": "^6.0.1",
@@ -47,7 +46,7 @@
4746
"is-interactive": "^2.0.0",
4847
"is-npm": "^6.0.0",
4948
"is-path-inside": "^4.0.0",
50-
"is-unicode-supported": "^2.0.0",
49+
"is-unicode-supported": "^2.1.0",
5150
"is-wsl": "^3.1.0",
5251
"ky": "^1.2.0",
5352
"latest-version": "^9.0.0",
@@ -70,23 +69,24 @@
7069
"stubborn-fs": "^1.2.5",
7170
"terminal-link": "^3.0.0",
7271
"unicorn-magic": "^0.1.0",
73-
"update-notifier": "^7.3.0",
72+
"update-notifier": "^7.3.1",
7473
"when-exit": "^2.1.1",
7574
"widest-line": "^5.0.0",
7675
"wrap-ansi": "^9.0.0",
7776
"xdg-basedir": "^5.1.0"
7877
},
7978
"external": {
8079
"@apideck/better-ajv-errors": "^0.3.6",
81-
"@cyclonedx/cdxgen": "^10.9.8",
82-
"@inquirer/prompts": "^5.5.0",
83-
"@npmcli/promise-spawn": "^8.0.0",
80+
"@cyclonedx/cdxgen": "^10.10.4",
81+
"@inquirer/prompts": "^7.0.0",
82+
"@npmcli/promise-spawn": "^8.0.1",
83+
"@socketregistry/hyrious__bun.lockb": "1.0.0",
8484
"@socketsecurity/config": "^2.1.3",
8585
"@socketsecurity/sdk": "^1.3.0",
8686
"ansi-align": "^3.0.1",
8787
"blessed": "^0.1.81",
8888
"blessed-contrib": "^4.11.0",
89-
"browserslist": "4.23.3",
89+
"browserslist": "4.24.0",
9090
"chalk-table": "^1.0.2",
9191
"cli-boxes": "^4.0.1",
9292
"cli-spinners": "^3.2.0",
@@ -98,10 +98,10 @@
9898
"graceful-fs": "^4.2.11",
9999
"has-flag": "^5.0.1",
100100
"hpagent": "^1.2.0",
101-
"ignore": "^5.3.2",
101+
"ignore": "^6.0.2",
102102
"ini": "5.0.0",
103103
"onetime": "^7.0.0",
104-
"pacote": "^18.0.6",
104+
"pacote": "^19.0.0",
105105
"pony-cause": "^2.1.11",
106106
"rc": "1.2.8",
107107
"registry-auth-token": "^5.0.2",
@@ -110,11 +110,12 @@
110110
"supports-color": "^9.4.0",
111111
"supports-hyperlinks": "^3.1.0",
112112
"synp": "^1.9.13",
113-
"which": "^4.0.0",
114-
"write-file-atomic": "^5.0.1",
113+
"which": "^5.0.0",
114+
"write-file-atomic": "^6.0.0",
115115
"yargs-parser": "^21.1.1"
116116
},
117117
"transitives": {
118+
"@socketregistry/hyrious__bun.lockb": "1.0.0",
118119
"ansi-align": "^3.0.1",
119120
"cli-boxes": "^4.0.1",
120121
"cli-spinners": "^3.2.0",
@@ -133,6 +134,6 @@
133134
"signal-exit": "^4.1.0",
134135
"supports-color": "^9.4.0",
135136
"supports-hyperlinks": "^3.1.0",
136-
"write-file-atomic": "^5.0.1"
137+
"write-file-atomic": "^6.0.0"
137138
}
138139
}

.editorconfig

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
root = true
22

33
[*]
4+
charset = utf-8
45
end_of_line = lf
5-
insert_final_newline = true
6-
indent_style = space
76
indent_size = 2
8-
charset = utf-8
7+
indent_style = space
8+
insert_final_newline = true
9+
max_line_length = 80
910
trim_trailing_whitespace = true

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lfs

.gitignore

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
1-
# Basic ones
21
.DS_Store
3-
/.eslintcache
2+
._.DS_Store
3+
Thumbs.db
44
/.env
5+
/.eslintcache
6+
/.nvm
57
/.tap
68
/.vscode
79
/coverage
10+
/npm-debug.log
811
**/dist
912
**/node_modules
1013
/*.tsbuildinfo
11-
12-
# We're a library, so please, no lock files
13-
/yarn.lock
14-
15-
# Generated types
1614
*.d.ts
1715
*.d.ts.map
1816

19-
# Library specific ones
2017
!/.vscode/extensions.json
2118
/test/socket-npm-fixtures/**/node_modules/

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npm test

.oxlintrc.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
"no-await-in-loop": "allow",
77
"no-control-regex": "allow",
88
"no-empty-file": "allow",
9+
"no-extend-native": "allow",
910
"no-extraneous-class": "allow",
1011
"no-new": "allow",
1112
"no-new-array": "allow",
1213
"no-this-alias": ["deny"],
14+
"no-self-assign": "allow",
1315
"no-unused-vars": "allow"
1416
}
1517
}

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"semi": false,
44
"singleQuote": true,
55
"trailingComma": "none",
6-
"printWidth": 80
6+
"proseWrap": "always"
77
}

0 commit comments

Comments
 (0)