Skip to content

Commit def2cba

Browse files
committed
Update dev-dependencies
1 parent 4235a92 commit def2cba

File tree

13 files changed

+2540
-2616
lines changed

13 files changed

+2540
-2616
lines changed

package-lock.json

Lines changed: 2437 additions & 2534 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 67 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"@next/mdx": "^15.0.0",
3636
"@node-loader/core": "^2.0.0",
3737
"@rollup/plugin-babel": "^6.0.0",
38-
"@sparticuz/chromium": "^133.0.0",
38+
"@sparticuz/chromium": "^138.0.0",
3939
"@types/babel__core": "^7.0.0",
4040
"@types/dlv": "^1.0.0",
4141
"@types/mdx": "^2.0.0",
@@ -52,16 +52,16 @@
5252
"bun-types": "^1.0.0",
5353
"c8": "^10.0.0",
5454
"copy-to-clipboard": "^3.0.0",
55-
"cross-env": "^7.0.0",
55+
"cross-env": "^10.0.0",
5656
"cssnano": "^7.0.0",
5757
"devlop": "^1.0.0",
5858
"dlv": "^1.0.0",
5959
"esbuild": "^0.25.0",
60-
"eslint-config-xo-react": "^0.27.0",
60+
"eslint-config-xo-react": "^0.28.0",
6161
"eslint-plugin-es": "^4.0.0",
6262
"eslint-plugin-react": "^7.0.0",
6363
"eslint-plugin-react-hooks": "^5.0.0",
64-
"estree-to-babel": "^10.0.0",
64+
"estree-to-babel": "^11.0.0",
6565
"estree-util-scope": "^1.0.0",
6666
"estree-util-value-to-estree": "^3.0.0",
6767
"estree-walker": "^3.0.0",
@@ -73,7 +73,7 @@
7373
"hast-util-to-jsx-runtime": "^2.0.0",
7474
"hast-util-to-text": "^4.0.0",
7575
"hastscript": "^9.0.0",
76-
"ink": "^5.0.0",
76+
"ink": "^6.0.0",
7777
"lz-string": "^1.0.0",
7878
"p-all": "^5.0.0",
7979
"postcss": "^8.0.0",
@@ -84,7 +84,7 @@
8484
"puppeteer": "^24.0.0",
8585
"react": "^19.0.0",
8686
"react-dom": "^19.0.0",
87-
"react-error-boundary": "^5.0.0",
87+
"react-error-boundary": "^6.0.0",
8888
"rehype-autolink-headings": "^7.0.0",
8989
"rehype-document": "^7.0.0",
9090
"rehype-infer-description-meta": "^2.0.0",
@@ -131,7 +131,7 @@
131131
"xast-util-feed": "^2.0.0",
132132
"xast-util-sitemap": "^2.0.0",
133133
"xast-util-to-xml": "^4.0.0",
134-
"xo": "^0.60.0"
134+
"xo": "^1.0.0"
135135
},
136136
"scripts": {
137137
"build": "tsc --build --clean && tsc --build && type-coverage",
@@ -184,48 +184,68 @@
184184
"ignoreCatch": true,
185185
"strict": true
186186
},
187-
"xo": {
188-
"envs": [
189-
"shared-node-browser"
190-
],
191-
"overrides": [
192-
{
193-
"files": [
194-
"docs/_asset/editor.jsx",
195-
"docs/_asset/index.js"
196-
],
197-
"envs": [
198-
"browser"
199-
]
200-
},
201-
{
202-
"files": [
203-
"docs/**/*.jsx",
204-
"docs/**/*.js"
205-
],
206-
"extends": "xo-react",
207-
"rules": {
208-
"react/react-in-jsx-scope": "off"
209-
}
187+
"xo": [
188+
{
189+
"files": [
190+
"**/*.{cjs,jsx,js,ts}"
191+
],
192+
"prettier": true,
193+
"react": true,
194+
"rules": {
195+
"complexity": "off",
196+
"import-x/no-extraneous-dependencies": "off",
197+
"import-x/order": "off",
198+
"logical-assignment-operators": "off",
199+
"max-depth": "off",
200+
"max-lines": "off",
201+
"n/no-extraneous-import": "off",
202+
"prefer-destructuring": "off",
203+
"promise/prefer-await-to-then": "off",
204+
"promise/prefer-catch": "off",
205+
"unicorn/no-this-assignment": "off",
206+
"unicorn/prefer-at": "off",
207+
"unicorn/prefer-spread": "off",
208+
"unicorn/prefer-string-raw": "off",
209+
"react-hooks/rules-of-hooks": "off",
210+
"react/jsx-no-bind": "off"
210211
},
211-
{
212-
"files": [
213-
"**/*.ts"
214-
],
215-
"rules": {
216-
"@typescript-eslint/array-type": "off",
217-
"@typescript-eslint/ban-types": "off",
218-
"@typescript-eslint/consistent-type-definitions": "off"
212+
"space": true
213+
},
214+
{
215+
"files": [
216+
"docs/_asset/editor.jsx",
217+
"docs/_asset/index.js"
218+
],
219+
"languageOptions": {
220+
"globals": {
221+
"CSS": "readonly",
222+
"HTMLButtonElement": "readonly",
223+
"document": "readonly",
224+
"window": "readonly"
219225
}
220226
}
221-
],
222-
"prettier": true,
223-
"rules": {
224-
"complexity": "off",
225-
"logical-assignment-operators": "off",
226-
"n/file-extension-in-import": "off",
227-
"react/jsx-no-bind": "off",
228-
"react/prop-types": "off"
227+
},
228+
{
229+
"files": [
230+
"**/*.jsx",
231+
"docs/**/*.js"
232+
],
233+
"rules": {
234+
"react/react-in-jsx-scope": "off"
235+
}
236+
},
237+
{
238+
"files": [
239+
"**/*.ts"
240+
],
241+
"rules": {
242+
"@typescript-eslint/array-type": "off",
243+
"@typescript-eslint/no-restricted-types": "off",
244+
"@typescript-eslint/consistent-type-definitions": [
245+
"error",
246+
"interface"
247+
]
248+
}
229249
}
230-
}
250+
]
231251
}

packages/esbuild/lib/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
*/
4141

4242
import assert from 'node:assert'
43+
import {Buffer} from 'node:buffer'
4344
import fs from 'node:fs/promises'
4445
import path from 'node:path'
4546
import {createFormatAwareProcessors} from '@mdx-js/mdx/internal-create-format-aware-processors'
@@ -137,7 +138,7 @@ export function esbuild(options) {
137138
}
138139

139140
// Safety check: the file has a path, so there has to be a `dirname`.
140-
assert(file.dirname, 'expected `dirname` to be defined')
141+
assert.ok(file.dirname, 'expected `dirname` to be defined')
141142

142143
return {
143144
contents: value || '',

packages/esbuild/test/index.js

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -392,31 +392,31 @@ test('@mdx-js/esbuild', async function (t) {
392392
const esm = tree.children[0] // Export
393393
const eol = tree.children[1] // EOL between both, no position.
394394
const head = tree.children[2] // Heading
395-
assert(esm)
396-
assert(esm.type === 'mdxjsEsm')
397-
assert(eol)
398-
assert(eol.type === 'text')
399-
assert(!eol.position)
400-
assert(head)
401-
assert(head.type === 'element')
402-
assert(head.position)
395+
assert.ok(esm)
396+
assert.ok(esm.type === 'mdxjsEsm')
397+
assert.ok(eol)
398+
assert.ok(eol.type === 'text')
399+
assert.ok(!eol.position)
400+
assert.ok(head)
401+
assert.ok(head.type === 'element')
402+
assert.ok(head.position)
403403

404404
const text = head.children[0] // Text in heading
405405
const jsx = head.children[1] // JSX in heading
406406

407-
assert(text)
408-
assert(text.type === 'text')
409-
assert(jsx)
410-
assert(jsx.type === 'mdxJsxTextElement')
407+
assert.ok(text)
408+
assert.ok(text.type === 'text')
409+
assert.ok(jsx)
410+
assert.ok(jsx.type === 'mdxJsxTextElement')
411411

412412
file.message('1')
413413
file.message('2', eol)
414414
file.message('3', tree)
415415
file.message('4', esm)
416416
file.message('5', text)
417417
const m6 = file.message('6', jsx)
418-
assert(m6.place)
419-
assert('start' in m6.place)
418+
assert.ok(m6.place)
419+
assert.ok('start' in m6.place)
420420
delete m6.place.start.offset
421421
file.message('7', head.position.end).fatal = true // End of heading
422422
}
@@ -448,6 +448,7 @@ test('@mdx-js/esbuild', async function (t) {
448448
detail: {
449449
cause: {},
450450
fatal: true,
451+
file: '',
451452
message: 'Cannot process MDX file with esbuild',
452453
name: '1:1',
453454
reason: 'Cannot process MDX file with esbuild',
@@ -557,11 +558,11 @@ test('@mdx-js/esbuild', async function (t) {
557558
assert.throws(
558559
() => renderToStaticMarkup(React.createElement(Content)),
559560
(error) => {
560-
assert(error instanceof Error)
561+
assert.ok(error instanceof Error)
561562
assert.equal(error.message, 'Boom')
562563
// Source maps are off.
563564
// The column should be 26, not 8.
564-
assert(error.stack?.includes('crash.mdx:2:8)'))
565+
assert.ok(error.stack?.includes('crash.mdx:2:8)'))
565566
return true
566567
}
567568
)

packages/loader/lib/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ export function loader(value, callback) {
9090
function (file) {
9191
callback(
9292
undefined,
93-
// @ts-expect-error: seems to be `@types/node` bug that suddenly started
94-
// to error.
9593
Buffer.from(file.value),
9694
// @ts-expect-error: `webpack` is not compiled with `exactOptionalPropertyTypes`,
9795
// so it does not allow `sourceRoot` in `file.map` to be `undefined` here.

packages/loader/test/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ test('@mdx-js/loader', async function (t) {
4747
}
4848
})
4949

50-
assert(result)
50+
assert.ok(result)
5151
assert.ok(!result.hasErrors())
5252

5353
// One for ESM loading CJS, one for webpack.
@@ -100,7 +100,7 @@ test('@mdx-js/loader', async function (t) {
100100
}
101101
})
102102

103-
assert(result)
103+
assert.ok(result)
104104
assert.ok(!result.hasErrors())
105105

106106
const output = String(await fs.readFile(jsUrl))
@@ -136,7 +136,7 @@ test('@mdx-js/loader', async function (t) {
136136
}
137137
})
138138

139-
assert(result)
139+
assert.ok(result)
140140
const errors = result.toJson().errors || []
141141
const error = errors[0]
142142

@@ -177,7 +177,7 @@ webpack.mdx:1:22: Unexpected end of file in expression, expected a corresponding
177177
}
178178
})
179179

180-
assert(result)
180+
assert.ok(result)
181181
assert.ok(!result.hasErrors())
182182

183183
const output = String(await fs.readFile(jsUrl))
@@ -220,7 +220,7 @@ webpack.mdx:1:22: Unexpected end of file in expression, expected a corresponding
220220
}
221221
})
222222

223-
assert(result)
223+
assert.ok(result)
224224
const errors = result.toJson().errors || []
225225
const error = errors[0]
226226

packages/mdx/test/compile.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1058,6 +1058,7 @@ test('@mdx-js/mdx: compile', async function (t) {
10581058

10591059
file.value +=
10601060
'\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,' +
1061+
// eslint-disable-next-line no-restricted-globals
10611062
btoa(JSON.stringify(file.map)) +
10621063
'\n'
10631064

@@ -1152,7 +1153,7 @@ test('@mdx-js/mdx: compile', async function (t) {
11521153
)
11531154

11541155
const get = result.get
1155-
assert(typeof get === 'function')
1156+
assert.ok(typeof get === 'function')
11561157
assert.equal(await get(), 3.14)
11571158
}
11581159
)

packages/mdx/test/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable import/no-unassigned-import */
1+
/* eslint-disable import-x/no-unassigned-import */
22
import './compile.js'
33
import './core.js'
44
import './evaluate.js'

packages/node-loader/lib/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* @typedef {[regex: RegExp, process: Process]} Settings
2020
*/
2121

22+
import {Buffer} from 'node:buffer'
2223
import fs from 'node:fs/promises'
2324
import {createFormatAwareProcessors} from '@mdx-js/mdx/internal-create-format-aware-processors'
2425
import {extnamesToRegex} from '@mdx-js/mdx/internal-extnames-to-regex'

packages/node-loader/test/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ test('@mdx-js/node-loader', async function (t) {
8686
assert.throws(
8787
() => renderToStaticMarkup(React.createElement(Content)),
8888
(error) => {
89-
assert(error instanceof Error)
89+
assert.ok(error instanceof Error)
9090
assert.equal(error.message, 'Boom')
9191
// Source maps are off.
9292
// The column should be 26, not 8.
93-
assert(error.stack?.includes('crash.mdx:2:8)'))
93+
assert.ok(error.stack?.includes('crash.mdx:2:8)'))
9494
return true
9595
}
9696
)

0 commit comments

Comments
 (0)