Skip to content

Commit 46fae4f

Browse files
authored
Update dev-dependencies
Closes GH-1938. Closes GH-1963. Closes GH-1977.
1 parent 656a4ae commit 46fae4f

File tree

15 files changed

+2756
-2469
lines changed

15 files changed

+2756
-2469
lines changed

docs/_component/foot-site.server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const FootSite = () => (
2323
</small>
2424
<br />
2525
<small>
26-
Site on <a href={new URL('./docs/', config.ghTree).href}>GitHub</a>
26+
Site on <a href={new URL('docs/', config.ghTree).href}>GitHub</a>
2727
</small>
2828
<br />
2929
<small>

docs/_config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ const git = new URL('../', import.meta.url)
33
const gh = new URL('https://github.com/mdx-js/mdx/')
44

55
export const config = {
6-
input: new URL('./docs/', git),
7-
output: new URL('./public/', git),
6+
input: new URL('docs/', git),
7+
output: new URL('public/', git),
88
git,
99
gh,
10-
ghBlob: new URL('./blob/main/', gh),
11-
ghTree: new URL('./tree/main/', gh),
10+
ghBlob: new URL('blob/main/', gh),
11+
ghTree: new URL('tree/main/', gh),
1212
site,
1313
twitter: new URL('https://twitter.com/mdx_js'),
1414
oc: new URL('https://opencollective.com/unified'),

package-lock.json

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"react-error-boundary": "^3.0.0",
7070
"react-fetch": "0.0.0-experimental-7ec4c5597",
7171
"react-server-dom-webpack": "0.0.0-experimental-7ec4c5597",
72-
"react-tabs": "^3.0.0",
72+
"react-tabs": "^4.0.0",
7373
"react-use-clipboard": "^1.0.0",
7474
"rehype-autolink-headings": "^6.0.0",
7575
"rehype-document": "^6.0.0",
@@ -113,7 +113,7 @@
113113
"xast-util-feed": "^1.0.0",
114114
"xast-util-sitemap": "^1.0.0",
115115
"xast-util-to-xml": "^3.0.0",
116-
"xo": "^0.47.0"
116+
"xo": "^0.48.0"
117117
},
118118
"scripts": {
119119
"postinstall": "patch-package",

packages/esbuild/test/index.test.js

Lines changed: 63 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ import {test} from 'uvu'
1414
import * as assert from 'uvu/assert'
1515
import esbuild from 'esbuild'
1616
import React from 'react'
17-
import {renderToStaticMarkup} from 'react-dom/server.js'
17+
import {renderToStaticMarkup} from 'react-dom/server'
1818
import esbuildMdx from '../index.js'
1919

2020
test('@mdx-js/esbuild', async () => {
2121
// MDX.
2222
await fs.writeFile(
23-
new URL('./esbuild.mdx', import.meta.url),
23+
new URL('esbuild.mdx', import.meta.url),
2424
'export const Message = () => <>World!</>\n\n# Hello, <Message />'
2525
)
2626

2727
await esbuild.build({
2828
bundle: true,
2929
define: {'process.env.NODE_ENV': '"development"'},
30-
entryPoints: [fileURLToPath(new URL('./esbuild.mdx', import.meta.url))],
31-
outfile: fileURLToPath(new URL('./esbuild.js', import.meta.url)),
30+
entryPoints: [fileURLToPath(new URL('esbuild.mdx', import.meta.url))],
31+
outfile: fileURLToPath(new URL('esbuild.js', import.meta.url)),
3232
format: 'esm',
3333
plugins: [esbuildMdx()]
3434
})
@@ -44,30 +44,30 @@ test('@mdx-js/esbuild', async () => {
4444
'should compile'
4545
)
4646

47-
await fs.unlink(new URL('./esbuild.mdx', import.meta.url))
48-
await fs.unlink(new URL('./esbuild.js', import.meta.url))
47+
await fs.unlink(new URL('esbuild.mdx', import.meta.url))
48+
await fs.unlink(new URL('esbuild.js', import.meta.url))
4949

5050
// Resolve directory.
5151
await fs.writeFile(
52-
new URL('./esbuild-resolve.mdx', import.meta.url),
52+
new URL('esbuild-resolve.mdx', import.meta.url),
5353
'import Content from "./folder/file.mdx"\n\n<Content/>'
5454
)
55-
await fs.mkdir(new URL('./folder', import.meta.url))
55+
await fs.mkdir(new URL('folder', import.meta.url))
5656
await fs.writeFile(
57-
new URL('./folder/file.mdx', import.meta.url),
57+
new URL('folder/file.mdx', import.meta.url),
5858
'import {data} from "./file.js"\n\n{data}'
5959
)
6060
await fs.writeFile(
61-
new URL('./folder/file.js', import.meta.url),
61+
new URL('folder/file.js', import.meta.url),
6262
'export const data = 0.1'
6363
)
6464
await esbuild.build({
6565
bundle: true,
6666
define: {'process.env.NODE_ENV': '"development"'},
6767
entryPoints: [
68-
fileURLToPath(new URL('./esbuild-resolve.mdx', import.meta.url))
68+
fileURLToPath(new URL('esbuild-resolve.mdx', import.meta.url))
6969
],
70-
outfile: fileURLToPath(new URL('./esbuild-resolve.js', import.meta.url)),
70+
outfile: fileURLToPath(new URL('esbuild-resolve.js', import.meta.url)),
7171
format: 'esm',
7272
plugins: [esbuildMdx()]
7373
})
@@ -82,18 +82,18 @@ test('@mdx-js/esbuild', async () => {
8282
'should compile'
8383
)
8484

85-
await fs.unlink(new URL('./esbuild-resolve.mdx', import.meta.url))
86-
await fs.unlink(new URL('./esbuild-resolve.js', import.meta.url))
87-
await fs.rmdir(new URL('./folder/', import.meta.url), {recursive: true})
85+
await fs.unlink(new URL('esbuild-resolve.mdx', import.meta.url))
86+
await fs.unlink(new URL('esbuild-resolve.js', import.meta.url))
87+
await fs.rmdir(new URL('folder/', import.meta.url), {recursive: true})
8888

8989
// Markdown.
90-
await fs.writeFile(new URL('./esbuild.md', import.meta.url), '\ta')
90+
await fs.writeFile(new URL('esbuild.md', import.meta.url), '\ta')
9191

9292
await esbuild.build({
9393
bundle: true,
9494
define: {'process.env.NODE_ENV': '"development"'},
95-
entryPoints: [fileURLToPath(new URL('./esbuild.md', import.meta.url))],
96-
outfile: fileURLToPath(new URL('./esbuild-md.js', import.meta.url)),
95+
entryPoints: [fileURLToPath(new URL('esbuild.md', import.meta.url))],
96+
outfile: fileURLToPath(new URL('esbuild-md.js', import.meta.url)),
9797
format: 'esm',
9898
plugins: [esbuildMdx()]
9999
})
@@ -108,17 +108,17 @@ test('@mdx-js/esbuild', async () => {
108108
'should compile `.md`'
109109
)
110110

111-
await fs.unlink(new URL('./esbuild.md', import.meta.url))
112-
await fs.unlink(new URL('./esbuild-md.js', import.meta.url))
111+
await fs.unlink(new URL('esbuild.md', import.meta.url))
112+
await fs.unlink(new URL('esbuild-md.js', import.meta.url))
113113

114114
// `.md` as MDX extension.
115-
await fs.writeFile(new URL('./esbuild.md', import.meta.url), '\ta')
115+
await fs.writeFile(new URL('esbuild.md', import.meta.url), '\ta')
116116

117117
await esbuild.build({
118118
bundle: true,
119119
define: {'process.env.NODE_ENV': '"development"'},
120-
entryPoints: [fileURLToPath(new URL('./esbuild.md', import.meta.url))],
121-
outfile: fileURLToPath(new URL('./esbuild-md-as-mdx.js', import.meta.url)),
120+
entryPoints: [fileURLToPath(new URL('esbuild.md', import.meta.url))],
121+
outfile: fileURLToPath(new URL('esbuild-md-as-mdx.js', import.meta.url)),
122122
format: 'esm',
123123
plugins: [esbuildMdx({mdExtensions: [], mdxExtensions: ['.md']})]
124124
})
@@ -133,20 +133,18 @@ test('@mdx-js/esbuild', async () => {
133133
'should compile `.md` as MDX w/ configuration'
134134
)
135135

136-
await fs.unlink(new URL('./esbuild.md', import.meta.url))
137-
await fs.unlink(new URL('./esbuild-md-as-mdx.js', import.meta.url))
136+
await fs.unlink(new URL('esbuild.md', import.meta.url))
137+
await fs.unlink(new URL('esbuild-md-as-mdx.js', import.meta.url))
138138

139139
// File not in `extnames`:
140-
await fs.writeFile(new URL('./esbuild.md', import.meta.url), 'a')
141-
await fs.writeFile(new URL('./esbuild.mdx', import.meta.url), 'a')
140+
await fs.writeFile(new URL('esbuild.md', import.meta.url), 'a')
141+
await fs.writeFile(new URL('esbuild.mdx', import.meta.url), 'a')
142142

143143
console.log('\nnote: the following error is expected!\n')
144144
try {
145145
await esbuild.build({
146-
entryPoints: [fileURLToPath(new URL('./esbuild.md', import.meta.url))],
147-
outfile: fileURLToPath(
148-
new URL('./esbuild-md-as-mdx.js', import.meta.url)
149-
),
146+
entryPoints: [fileURLToPath(new URL('esbuild.md', import.meta.url))],
147+
outfile: fileURLToPath(new URL('esbuild-md-as-mdx.js', import.meta.url)),
150148
plugins: [esbuildMdx({format: 'mdx'})]
151149
})
152150
assert.unreachable()
@@ -161,10 +159,8 @@ test('@mdx-js/esbuild', async () => {
161159
console.log('\nnote: the following error is expected!\n')
162160
try {
163161
await esbuild.build({
164-
entryPoints: [fileURLToPath(new URL('./esbuild.mdx', import.meta.url))],
165-
outfile: fileURLToPath(
166-
new URL('./esbuild-md-as-mdx.js', import.meta.url)
167-
),
162+
entryPoints: [fileURLToPath(new URL('esbuild.mdx', import.meta.url))],
163+
outfile: fileURLToPath(new URL('esbuild-md-as-mdx.js', import.meta.url)),
168164
plugins: [esbuildMdx({format: 'md'})]
169165
})
170166
assert.unreachable()
@@ -176,22 +172,22 @@ test('@mdx-js/esbuild', async () => {
176172
)
177173
}
178174

179-
await fs.unlink(new URL('./esbuild.md', import.meta.url))
180-
await fs.unlink(new URL('./esbuild.mdx', import.meta.url))
175+
await fs.unlink(new URL('esbuild.md', import.meta.url))
176+
await fs.unlink(new URL('esbuild.mdx', import.meta.url))
181177

182178
console.log('\nnote: the following errors and warnings are expected!\n')
183179

184180
await fs.writeFile(
185-
new URL('./esbuild-broken.mdx', import.meta.url),
181+
new URL('esbuild-broken.mdx', import.meta.url),
186182
'asd <https://example.com>?'
187183
)
188184

189185
try {
190186
await esbuild.build({
191187
entryPoints: [
192-
fileURLToPath(new URL('./esbuild-broken.mdx', import.meta.url))
188+
fileURLToPath(new URL('esbuild-broken.mdx', import.meta.url))
193189
],
194-
outfile: fileURLToPath(new URL('./esbuild.js', import.meta.url)),
190+
outfile: fileURLToPath(new URL('esbuild.js', import.meta.url)),
195191
plugins: [esbuildMdx()]
196192
})
197193
assert.unreachable('esbuild should throw')
@@ -219,19 +215,19 @@ test('@mdx-js/esbuild', async () => {
219215
)
220216
}
221217

222-
await fs.unlink(new URL('./esbuild-broken.mdx', import.meta.url))
218+
await fs.unlink(new URL('esbuild-broken.mdx', import.meta.url))
223219

224220
await fs.writeFile(
225-
new URL('./esbuild-warnings.mdx', import.meta.url),
221+
new URL('esbuild-warnings.mdx', import.meta.url),
226222
'export const Message = () => <>World!</>\n\n# Hello, <Message />'
227223
)
228224

229225
try {
230226
await esbuild.build({
231227
entryPoints: [
232-
fileURLToPath(new URL('./esbuild-warnings.mdx', import.meta.url))
228+
fileURLToPath(new URL('esbuild-warnings.mdx', import.meta.url))
233229
],
234-
outfile: fileURLToPath(new URL('./esbuild-warnings.js', import.meta.url)),
230+
outfile: fileURLToPath(new URL('esbuild-warnings.js', import.meta.url)),
235231
format: 'esm',
236232
plugins: [
237233
esbuildMdx({
@@ -386,20 +382,20 @@ test('@mdx-js/esbuild', async () => {
386382
)
387383
}
388384

389-
await fs.unlink(new URL('./esbuild-warnings.mdx', import.meta.url))
385+
await fs.unlink(new URL('esbuild-warnings.mdx', import.meta.url))
390386

391387
await fs.writeFile(
392-
new URL('./esbuild-plugin-crash.mdx', import.meta.url),
388+
new URL('esbuild-plugin-crash.mdx', import.meta.url),
393389
'# hi'
394390
)
395391

396392
try {
397393
await esbuild.build({
398394
entryPoints: [
399-
fileURLToPath(new URL('./esbuild-plugin-crash.mdx', import.meta.url))
395+
fileURLToPath(new URL('esbuild-plugin-crash.mdx', import.meta.url))
400396
],
401397
outfile: fileURLToPath(
402-
new URL('./esbuild-plugin-crash.js', import.meta.url)
398+
new URL('esbuild-plugin-crash.js', import.meta.url)
403399
),
404400
format: 'esm',
405401
plugins: [
@@ -449,25 +445,25 @@ test('@mdx-js/esbuild', async () => {
449445
)
450446
}
451447

452-
await fs.unlink(new URL('./esbuild-plugin-crash.mdx', import.meta.url))
448+
await fs.unlink(new URL('esbuild-plugin-crash.mdx', import.meta.url))
453449

454450
console.log('\nnote: the preceding errors and warnings are expected!\n')
455451

456452
/** @type {(contents: string) => import('esbuild').Plugin} */
457453
const inlinePlugin = (contents) => ({
458454
name: 'inline plugin',
459-
setup: (build) => {
455+
setup(build) {
460456
build.onResolve({filter: /esbuild\.mdx/}, () => ({
461-
path: fileURLToPath(new URL('./esbuild.mdx', import.meta.url)),
457+
path: fileURLToPath(new URL('esbuild.mdx', import.meta.url)),
462458
pluginData: {contents}
463459
}))
464460
}
465461
})
466462

467463
await esbuild.build({
468-
entryPoints: [fileURLToPath(new URL('./esbuild.mdx', import.meta.url))],
464+
entryPoints: [fileURLToPath(new URL('esbuild.mdx', import.meta.url))],
469465
outfile: fileURLToPath(
470-
new URL('./esbuild-compile-from-memory.js', import.meta.url)
466+
new URL('esbuild-compile-from-memory.js', import.meta.url)
471467
),
472468
plugins: [inlinePlugin(`# Test`), esbuildMdx()],
473469
define: {'process.env.NODE_ENV': '"development"'},
@@ -485,12 +481,12 @@ test('@mdx-js/esbuild', async () => {
485481
'should compile from `pluginData.content`'
486482
)
487483

488-
await fs.unlink(new URL('./esbuild-compile-from-memory.js', import.meta.url))
484+
await fs.unlink(new URL('esbuild-compile-from-memory.js', import.meta.url))
489485

490486
await esbuild.build({
491-
entryPoints: [fileURLToPath(new URL('./esbuild.mdx', import.meta.url))],
487+
entryPoints: [fileURLToPath(new URL('esbuild.mdx', import.meta.url))],
492488
outfile: fileURLToPath(
493-
new URL('./esbuild-compile-from-memory-empty.js', import.meta.url)
489+
new URL('esbuild-compile-from-memory-empty.js', import.meta.url)
494490
),
495491
plugins: [inlinePlugin(``), esbuildMdx()],
496492
define: {'process.env.NODE_ENV': '"development"'},
@@ -509,21 +505,21 @@ test('@mdx-js/esbuild', async () => {
509505
)
510506

511507
await fs.unlink(
512-
new URL('./esbuild-compile-from-memory-empty.js', import.meta.url)
508+
new URL('esbuild-compile-from-memory-empty.js', import.meta.url)
513509
)
514510

515511
// Remote markdown.
516512
await fs.writeFile(
517-
new URL('./esbuild-with-remote-md.mdx', import.meta.url),
513+
new URL('esbuild-with-remote-md.mdx', import.meta.url),
518514
'import Content from "https://raw.githubusercontent.com/mdx-js/mdx/main/packages/esbuild/test/files/md-file.md"\n\n<Content />'
519515
)
520516

521517
await esbuild.build({
522518
entryPoints: [
523-
fileURLToPath(new URL('./esbuild-with-remote-md.mdx', import.meta.url))
519+
fileURLToPath(new URL('esbuild-with-remote-md.mdx', import.meta.url))
524520
],
525521
outfile: fileURLToPath(
526-
new URL('./esbuild-with-remote-md.js', import.meta.url)
522+
new URL('esbuild-with-remote-md.js', import.meta.url)
527523
),
528524
bundle: true,
529525
define: {'process.env.NODE_ENV': '"development"'},
@@ -541,21 +537,21 @@ test('@mdx-js/esbuild', async () => {
541537
'should compile remote markdown files w/ `allowDangerousRemoteMdx`'
542538
)
543539

544-
await fs.unlink(new URL('./esbuild-with-remote-md.mdx', import.meta.url))
545-
await fs.unlink(new URL('./esbuild-with-remote-md.js', import.meta.url))
540+
await fs.unlink(new URL('esbuild-with-remote-md.mdx', import.meta.url))
541+
await fs.unlink(new URL('esbuild-with-remote-md.js', import.meta.url))
546542

547543
// Remote MDX importing more markdown.
548544
await fs.writeFile(
549-
new URL('./esbuild-with-remote-mdx.mdx', import.meta.url),
545+
new URL('esbuild-with-remote-mdx.mdx', import.meta.url),
550546
'import Content from "https://raw.githubusercontent.com/mdx-js/mdx/main/packages/esbuild/test/files/mdx-file-importing-markdown.mdx"\n\n<Content />'
551547
)
552548

553549
await esbuild.build({
554550
entryPoints: [
555-
fileURLToPath(new URL('./esbuild-with-remote-mdx.mdx', import.meta.url))
551+
fileURLToPath(new URL('esbuild-with-remote-mdx.mdx', import.meta.url))
556552
],
557553
outfile: fileURLToPath(
558-
new URL('./esbuild-with-remote-mdx.js', import.meta.url)
554+
new URL('esbuild-with-remote-mdx.js', import.meta.url)
559555
),
560556
bundle: true,
561557
define: {'process.env.NODE_ENV': '"development"'},
@@ -573,8 +569,8 @@ test('@mdx-js/esbuild', async () => {
573569
'should compile remote MD, MDX, and JS files w/ `allowDangerousRemoteMdx`'
574570
)
575571

576-
await fs.unlink(new URL('./esbuild-with-remote-mdx.mdx', import.meta.url))
577-
await fs.unlink(new URL('./esbuild-with-remote-mdx.js', import.meta.url))
572+
await fs.unlink(new URL('esbuild-with-remote-mdx.mdx', import.meta.url))
573+
await fs.unlink(new URL('esbuild-with-remote-mdx.js', import.meta.url))
578574
})
579575

580576
test.run()

0 commit comments

Comments
 (0)