File tree 20 files changed +36
-43
lines changed
20 files changed +36
-43
lines changed Original file line number Diff line number Diff line change 1
1
/**
2
- * @typedef {import('@mdx-js/mdx/lib/core.js ').ProcessorOptions } ProcessorOptions
2
+ * @typedef {import('@mdx-js/mdx').ProcessorOptions } ProcessorOptions
3
3
* @typedef {import('esbuild').Message } Message
4
4
* @typedef {import('esbuild').OnLoadArgs } OnLoadArgs
5
5
* @typedef {import('esbuild').OnLoadResult } OnLoadResult
@@ -46,8 +46,8 @@ import assert from 'node:assert'
46
46
import fs from 'node:fs/promises'
47
47
import path from 'node:path'
48
48
import process from 'node:process'
49
- import { createFormatAwareProcessors } from '@mdx-js/mdx/lib/util/ create-format-aware-processors.js '
50
- import { extnamesToRegex } from '@mdx-js/mdx/lib/util/ extnames-to-regex.js '
49
+ import { createFormatAwareProcessors } from '@mdx-js/mdx/internal- create-format-aware-processors'
50
+ import { extnamesToRegex } from '@mdx-js/mdx/internal- extnames-to-regex'
51
51
import { fetch } from 'undici'
52
52
import { VFile } from 'vfile'
53
53
Original file line number Diff line number Diff line change 30
30
],
31
31
"type" : " module" ,
32
32
"sideEffects" : false ,
33
- "main" : " index.js" ,
34
- "types" : " index.d.ts" ,
33
+ "exports" : " ./index.js" ,
35
34
"files" : [
36
35
" lib/" ,
37
36
" index.d.ts" ,
Original file line number Diff line number Diff line change 24
24
import { Buffer } from 'node:buffer'
25
25
import { createHash } from 'node:crypto'
26
26
import path from 'node:path'
27
- import { createFormatAwareProcessors } from '@mdx-js/mdx/lib/util/ create-format-aware-processors.js '
27
+ import { createFormatAwareProcessors } from '@mdx-js/mdx/internal- create-format-aware-processors'
28
28
import { SourceMapGenerator } from 'source-map'
29
29
30
30
// Note: the cache is heavily inspired by:
Original file line number Diff line number Diff line change 35
35
],
36
36
"type" : " module" ,
37
37
"sideEffects" : false ,
38
- "main" : " index.cjs" ,
39
- "types" : " index.d.ts" ,
38
+ "exports" : " ./index.cjs" ,
40
39
"files" : [
41
40
" lib/" ,
42
41
" index.cjs" ,
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -51,8 +51,8 @@ import {recmaStringify} from './plugin/recma-stringify.js'
51
51
import { rehypeRecma } from './plugin/rehype-recma.js'
52
52
import { rehypeRemoveRaw } from './plugin/rehype-remove-raw.js'
53
53
import { remarkMarkAndUnravel } from './plugin/remark-mark-and-unravel.js'
54
- import { development as defaultDevelopment } from './condition.js'
55
54
import { nodeTypes } from './node-types.js'
55
+ import { development as defaultDevelopment } from '#condition'
56
56
57
57
const removedOptions = [
58
58
'compilers' ,
Original file line number Diff line number Diff line change 31
31
],
32
32
"type" : " module" ,
33
33
"sideEffects" : false ,
34
- "main" : " index.js" ,
35
- "types" : " index.d.ts" ,
36
- "browser" : {
37
- "./lib/condition.js" : " ./lib/condition.browser.js"
34
+ "exports" : {
35
+ "." : " ./index.js" ,
36
+ "./internal-create-format-aware-processors" : " ./lib/util/create-format-aware-processors.js" ,
37
+ "./internal-extnames-to-regex" : " ./lib/util/extnames-to-regex.js" ,
38
+ "./internal-resolve-evaluate-options" : " ./lib/util/resolve-evaluate-options.js"
38
39
},
39
- "react-native" : {
40
- "./lib/condition.js" : " ./lib/condition.browser.js"
40
+ "imports" : {
41
+ "#condition" : {
42
+ "node" : " ./lib/condition.node.js" ,
43
+ "default" : " ./lib/condition.default.js"
44
+ }
41
45
},
42
46
"files" : [
43
47
" lib/" ,
Original file line number Diff line number Diff line change 1
1
/**
2
- * @typedef {import('@mdx-js/mdx/lib/compile.js ').CompileOptions } Options
2
+ * @typedef {import('@mdx-js/mdx').CompileOptions } Options
3
3
*/
4
4
5
5
import fs from 'node:fs/promises'
6
- import { createFormatAwareProcessors } from '@mdx-js/mdx/lib/util/ create-format-aware-processors.js '
7
- import { extnamesToRegex } from '@mdx-js/mdx/lib/util/ extnames-to-regex.js '
6
+ import { createFormatAwareProcessors } from '@mdx-js/mdx/internal- create-format-aware-processors'
7
+ import { extnamesToRegex } from '@mdx-js/mdx/internal- extnames-to-regex'
8
8
import { VFile } from 'vfile'
9
9
10
10
/**
Original file line number Diff line number Diff line change 29
29
],
30
30
"type" : " module" ,
31
31
"sideEffects" : false ,
32
- "main" : " index.js" ,
33
- "types" : " index.d.ts" ,
32
+ "exports" : " ./index.js" ,
34
33
"files" : [
35
34
" lib/" ,
36
35
" index.d.ts" ,
Original file line number Diff line number Diff line change 33
33
],
34
34
"type" : " module" ,
35
35
"sideEffects" : false ,
36
- "main" : " index.js" ,
37
- "types" : " index.d.ts" ,
36
+ "exports" : " ./index.js" ,
38
37
"files" : [
39
38
" lib/" ,
40
39
" index.d.ts" ,
Original file line number Diff line number Diff line change 1
1
/* @jsxRuntime automatic @jsxImportSource preact */
2
2
3
3
/**
4
- * @typedef {import('@mdx-js/mdx/lib/util/ resolve-evaluate-options.js ').RuntimeProduction } RuntimeProduction
4
+ * @typedef {import('@mdx-js/mdx/internal- resolve-evaluate-options').RuntimeProduction } RuntimeProduction
5
5
*/
6
6
7
7
import assert from 'node:assert/strict'
Original file line number Diff line number Diff line change 32
32
],
33
33
"type" : " module" ,
34
34
"sideEffects" : false ,
35
- "main" : " index.js" ,
36
- "types" : " index.d.ts" ,
35
+ "exports" : " ./index.js" ,
37
36
"files" : [
38
37
" lib/" ,
39
38
" index.d.ts" ,
Original file line number Diff line number Diff line change 1
1
/**
2
- * @typedef {import('@mdx-js/mdx/lib/util/ resolve-evaluate-options.js ').RuntimeProduction } RuntimeProduction
2
+ * @typedef {import('@mdx-js/mdx/internal- resolve-evaluate-options').RuntimeProduction } RuntimeProduction
3
3
*/
4
4
5
5
import assert from 'node:assert/strict'
Original file line number Diff line number Diff line change 19
19
// @ts -expect-error: type imports from CJS do work.
20
20
/** @typedef {import('@mdx-js/mdx').EvaluateOptions } EvaluateOptions */
21
21
// @ts -expect-error: type imports from CJS do work.
22
- /** @typedef {import('@mdx-js/mdx/lib/run.js ') } RunMod */
22
+ /** @typedef {import('@mdx-js/mdx') } MdxMod */
23
23
// @ts -expect-error: type imports from CJS do work.
24
- /** @typedef {import('@mdx-js/mdx/lib/util/ create-format-aware-processors.js ') } CreateProcessorMod */
24
+ /** @typedef {import('@mdx-js/mdx/internal- create-format-aware-processors') } CreateProcessorMod */
25
25
// @ts -expect-error: type imports from CJS do work.
26
- /** @typedef {import('@mdx-js/mdx/lib/util/ resolve-evaluate-options.js ') } ResolveEvaluateMod */
26
+ /** @typedef {import('@mdx-js/mdx/internal- resolve-evaluate-options') } ResolveEvaluateMod */
27
27
28
28
'use strict'
29
29
30
30
const fs = require ( 'node:fs' )
31
31
const deasync = require ( 'deasync' )
32
32
33
33
const { createFormatAwareProcessors} = /** @type {CreateProcessorMod } */ (
34
- deasync ( load ) ( '@mdx-js/mdx/lib/util/ create-format-aware-processors.js ' )
34
+ deasync ( load ) ( '@mdx-js/mdx/internal- create-format-aware-processors' )
35
35
)
36
36
const { resolveEvaluateOptions} = /** @type {ResolveEvaluateMod } */ (
37
- deasync ( load ) ( '@mdx-js/mdx/lib/util/resolve-evaluate-options.js' )
38
- )
39
- const { runSync} = /** @type {RunMod } */ (
40
- deasync ( load ) ( '@mdx-js/mdx/lib/run.js' )
37
+ deasync ( load ) ( '@mdx-js/mdx/internal-resolve-evaluate-options' )
41
38
)
39
+ const { runSync} = /** @type {MdxMod } */ ( deasync ( load ) ( '@mdx-js/mdx' ) )
42
40
43
41
module . exports = register
44
42
Original file line number Diff line number Diff line change 29
29
],
30
30
"type" : " module" ,
31
31
"sideEffects" : true ,
32
- "main" : " index.cjs" ,
33
- "types" : " index.d.ts" ,
32
+ "exports" : " ./index.cjs" ,
34
33
"files" : [
35
34
" lib/" ,
36
35
" index.d.ts" ,
Original file line number Diff line number Diff line change 33
33
],
34
34
"type" : " module" ,
35
35
"sideEffects" : false ,
36
- "main" : " index.js" ,
37
- "types" : " index.d.ts" ,
36
+ "exports" : " ./index.js" ,
38
37
"files" : [
39
38
" lib/" ,
40
39
" index.d.ts" ,
Original file line number Diff line number Diff line change 19
19
* Configuration.
20
20
*/
21
21
22
- import { createFormatAwareProcessors } from '@mdx-js/mdx/lib/util/ create-format-aware-processors.js '
22
+ import { createFormatAwareProcessors } from '@mdx-js/mdx/internal- create-format-aware-processors'
23
23
import { createFilter } from '@rollup/pluginutils'
24
24
import { SourceMapGenerator } from 'source-map'
25
25
import { VFile } from 'vfile'
Original file line number Diff line number Diff line change 30
30
],
31
31
"type" : " module" ,
32
32
"sideEffects" : false ,
33
- "main" : " index.js" ,
34
- "types" : " index.d.ts" ,
33
+ "exports" : " ./index.js" ,
35
34
"files" : [
36
35
" lib/" ,
37
36
" index.d.ts" ,
Original file line number Diff line number Diff line change 28
28
],
29
29
"type" : " module" ,
30
30
"sideEffects" : false ,
31
- "main" : " index.js" ,
32
- "types" : " index.d.ts" ,
31
+ "exports" : " ./index.js" ,
33
32
"files" : [
34
33
" lib/" ,
35
34
" index.d.ts" ,
You can’t perform that action at this time.
0 commit comments