@wordpress/build 0.23.1-next.v.202609031004.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cache/tsconfig.tsbuildinfo +1 -1
- package/CHANGELOG.md +18 -1
- package/README.md +84 -96
- package/lib/build.mjs +94 -88
- package/lib/compile-inline-style.mjs +98 -0
- package/lib/route-utils.mjs +46 -17
- package/lib/source-files.mjs +10 -1
- package/lib/test/compile-inline-style.test.js +69 -0
- package/lib/test/source-files.js +16 -1
- package/lib/test/style-injection.browser.test.js +34 -0
- package/lib/test/style-injection.jsdom.test.js +11 -0
- package/lib/widget-utils.mjs +20 -1
- package/package.json +9 -9
- package/tsconfig.json +5 -2
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import cssnano from 'cssnano';
|
|
3
|
+
import postcss from 'postcss';
|
|
4
|
+
import postcssModules from 'postcss-modules';
|
|
5
|
+
|
|
6
|
+
/** @type {import('postcss').AcceptedPlugin | undefined} */
|
|
7
|
+
let dsTokenFallbacks;
|
|
8
|
+
try {
|
|
9
|
+
const { default: postcssPlugin } =
|
|
10
|
+
await import( '@wordpress/theme/postcss-plugins/postcss-ds-token-fallbacks' );
|
|
11
|
+
dsTokenFallbacks = postcssPlugin;
|
|
12
|
+
} catch {
|
|
13
|
+
// @wordpress/theme is optional; skip token fallbacks if not available.
|
|
14
|
+
}
|
|
15
|
+
export { dsTokenFallbacks };
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Compile CSS into the JavaScript module emitted by wp-build.
|
|
19
|
+
*
|
|
20
|
+
* @param {Object} options
|
|
21
|
+
* @param {boolean} [options.cssModules=false] Whether to emit CSS Module exports.
|
|
22
|
+
* @param {boolean} [options.minify=true] Whether to minify the CSS.
|
|
23
|
+
* @return {Function} esbuild-sass-plugin transform callback.
|
|
24
|
+
*/
|
|
25
|
+
export function compileInlineStyle( {
|
|
26
|
+
cssModules = false,
|
|
27
|
+
minify = true,
|
|
28
|
+
} = {} ) {
|
|
29
|
+
/**
|
|
30
|
+
* @param {string} cssText CSS source to compile.
|
|
31
|
+
* @param {string} _dirname Directory containing the source file.
|
|
32
|
+
* @param {string} filePath Source file path.
|
|
33
|
+
* @return {Promise<string>} Compiled JavaScript module.
|
|
34
|
+
*/
|
|
35
|
+
return async function styleType( cssText, _dirname, filePath ) {
|
|
36
|
+
let moduleExports = null;
|
|
37
|
+
|
|
38
|
+
const plugins = dsTokenFallbacks ? [ dsTokenFallbacks ] : [];
|
|
39
|
+
if ( cssModules ) {
|
|
40
|
+
plugins.push(
|
|
41
|
+
postcssModules( {
|
|
42
|
+
generateScopedName: '[contenthash]__[local]',
|
|
43
|
+
getJSON: ( _, json ) => {
|
|
44
|
+
moduleExports = json;
|
|
45
|
+
},
|
|
46
|
+
} )
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
if ( minify ) {
|
|
50
|
+
plugins.push(
|
|
51
|
+
cssnano( {
|
|
52
|
+
preset: [
|
|
53
|
+
'default',
|
|
54
|
+
{ discardComments: { removeAll: true } },
|
|
55
|
+
],
|
|
56
|
+
} )
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const { css } = await postcss( plugins ).process( cssText, {
|
|
61
|
+
from: filePath,
|
|
62
|
+
map: false,
|
|
63
|
+
} );
|
|
64
|
+
|
|
65
|
+
// Hash the transformed CSS so that the dedup key reflects the actual
|
|
66
|
+
// injected content, including mangled CSS module class names.
|
|
67
|
+
const hash = createHash( 'sha1' )
|
|
68
|
+
.update( css )
|
|
69
|
+
.digest( 'hex' )
|
|
70
|
+
.slice( 0, 10 );
|
|
71
|
+
const shouldInjectStyle =
|
|
72
|
+
`typeof process === 'undefined' || ` +
|
|
73
|
+
`process.env.NODE_ENV !== 'test'`;
|
|
74
|
+
|
|
75
|
+
// Skip automatic style injection in Node-based test environments, where DOM
|
|
76
|
+
// implementations do not reliably support modern CSS features like @layer.
|
|
77
|
+
let cssModule = cssModules
|
|
78
|
+
? `import { registerStyle } from '@wordpress/style-runtime';
|
|
79
|
+
if (${ shouldInjectStyle }) {
|
|
80
|
+
registerStyle("${ hash }", ${ JSON.stringify( css ) });
|
|
81
|
+
}
|
|
82
|
+
`
|
|
83
|
+
: `if (typeof document !== 'undefined' && (${ shouldInjectStyle }) && !document.head.querySelector("style[data-wp-hash='${ hash }']")) {
|
|
84
|
+
const style = document.createElement("style");
|
|
85
|
+
style.setAttribute("data-wp-hash", "${ hash }");
|
|
86
|
+
style.appendChild(document.createTextNode(${ JSON.stringify( css ) }));
|
|
87
|
+
document.head.appendChild(style);
|
|
88
|
+
}
|
|
89
|
+
`;
|
|
90
|
+
|
|
91
|
+
// The CSS modules transform produces an `exports` object with class name mappings.
|
|
92
|
+
if ( moduleExports ) {
|
|
93
|
+
const exportsString = JSON.stringify( moduleExports );
|
|
94
|
+
cssModule += `export default ${ exportsString };\n`;
|
|
95
|
+
}
|
|
96
|
+
return cssModule;
|
|
97
|
+
};
|
|
98
|
+
}
|
package/lib/route-utils.mjs
CHANGED
|
@@ -63,44 +63,69 @@ export function getRouteMetadata( rootDir, routeName ) {
|
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
/**
|
|
67
|
+
* Source extensions for route entry files, in priority order.
|
|
68
|
+
* Must stay aligned with SOURCE_EXTENSIONS in source-files.mjs.
|
|
69
|
+
*/
|
|
70
|
+
const ROUTE_EXTENSIONS = [
|
|
71
|
+
'tsx',
|
|
72
|
+
'ts',
|
|
73
|
+
'mts',
|
|
74
|
+
'cts',
|
|
75
|
+
'jsx',
|
|
76
|
+
'js',
|
|
77
|
+
'mjs',
|
|
78
|
+
'cjs',
|
|
79
|
+
];
|
|
80
|
+
|
|
66
81
|
/**
|
|
67
82
|
* @typedef {Object} RouteFiles
|
|
68
|
-
* @property {boolean}
|
|
69
|
-
* @property {boolean}
|
|
70
|
-
* @property {boolean}
|
|
71
|
-
* @property {boolean}
|
|
72
|
-
* @property {boolean}
|
|
83
|
+
* @property {boolean} hasRoute Whether route file exists.
|
|
84
|
+
* @property {boolean} hasStage Whether stage file exists.
|
|
85
|
+
* @property {boolean} hasInspector Whether inspector file exists.
|
|
86
|
+
* @property {boolean} hasCanvas Whether canvas file exists.
|
|
87
|
+
* @property {boolean} hasStyle Whether style file exists.
|
|
88
|
+
* @property {string|null} stage Stage file name, extension included.
|
|
89
|
+
* @property {string|null} inspector Inspector file name, extension included.
|
|
90
|
+
* @property {string|null} canvas Canvas file name, extension included.
|
|
73
91
|
*/
|
|
74
92
|
|
|
75
93
|
/**
|
|
76
94
|
* Check if a route has specific files.
|
|
77
95
|
*
|
|
78
96
|
* @param {string} routeDirectory Route directory path.
|
|
79
|
-
* @return {RouteFiles} Object with
|
|
97
|
+
* @return {RouteFiles} Object with flags and file names for route files.
|
|
80
98
|
*/
|
|
81
99
|
export function getRouteFiles( routeDirectory ) {
|
|
82
|
-
|
|
100
|
+
/** @type {RouteFiles} */
|
|
83
101
|
const files = {
|
|
84
102
|
hasRoute: false,
|
|
85
103
|
hasStage: false,
|
|
86
104
|
hasInspector: false,
|
|
87
105
|
hasCanvas: false,
|
|
88
106
|
hasStyle: false,
|
|
107
|
+
stage: null,
|
|
108
|
+
inspector: null,
|
|
109
|
+
canvas: null,
|
|
89
110
|
};
|
|
90
111
|
|
|
91
112
|
const entries = readdirSync( routeDirectory );
|
|
92
113
|
|
|
93
|
-
|
|
114
|
+
// The extension list is ordered, so the first match wins.
|
|
115
|
+
for ( const ext of ROUTE_EXTENSIONS ) {
|
|
94
116
|
if ( entries.includes( `route.${ ext }` ) ) {
|
|
95
117
|
files.hasRoute = true;
|
|
96
118
|
}
|
|
97
|
-
if ( entries.includes( `stage.${ ext }` ) ) {
|
|
119
|
+
if ( ! files.stage && entries.includes( `stage.${ ext }` ) ) {
|
|
120
|
+
files.stage = `stage.${ ext }`;
|
|
98
121
|
files.hasStage = true;
|
|
99
122
|
}
|
|
100
|
-
if ( entries.includes( `inspector.${ ext }` ) ) {
|
|
123
|
+
if ( ! files.inspector && entries.includes( `inspector.${ ext }` ) ) {
|
|
124
|
+
files.inspector = `inspector.${ ext }`;
|
|
101
125
|
files.hasInspector = true;
|
|
102
126
|
}
|
|
103
|
-
if ( entries.includes( `canvas.${ ext }` ) ) {
|
|
127
|
+
if ( ! files.canvas && entries.includes( `canvas.${ ext }` ) ) {
|
|
128
|
+
files.canvas = `canvas.${ ext }`;
|
|
104
129
|
files.hasCanvas = true;
|
|
105
130
|
}
|
|
106
131
|
}
|
|
@@ -122,16 +147,20 @@ export function getRouteFiles( routeDirectory ) {
|
|
|
122
147
|
export function generateContentEntryPoint( files ) {
|
|
123
148
|
const lines = [];
|
|
124
149
|
|
|
125
|
-
|
|
126
|
-
|
|
150
|
+
/*
|
|
151
|
+
* Import the full file name rather than relying on esbuild extending an
|
|
152
|
+
* extensionless path: that resolution never tries `.mts` or `.cts`.
|
|
153
|
+
*/
|
|
154
|
+
if ( files.stage ) {
|
|
155
|
+
lines.push( `export { stage } from './${ files.stage }';` );
|
|
127
156
|
}
|
|
128
157
|
|
|
129
|
-
if ( files.
|
|
130
|
-
lines.push(
|
|
158
|
+
if ( files.inspector ) {
|
|
159
|
+
lines.push( `export { inspector } from './${ files.inspector }';` );
|
|
131
160
|
}
|
|
132
161
|
|
|
133
|
-
if ( files.
|
|
134
|
-
lines.push(
|
|
162
|
+
if ( files.canvas ) {
|
|
163
|
+
lines.push( `export { canvas } from './${ files.canvas }';` );
|
|
135
164
|
}
|
|
136
165
|
|
|
137
166
|
// If no components exist, export empty object
|
package/lib/source-files.mjs
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
const SOURCE_EXTENSIONS = [
|
|
1
|
+
const SOURCE_EXTENSIONS = [
|
|
2
|
+
'js',
|
|
3
|
+
'jsx',
|
|
4
|
+
'mjs',
|
|
5
|
+
'cjs',
|
|
6
|
+
'ts',
|
|
7
|
+
'tsx',
|
|
8
|
+
'mts',
|
|
9
|
+
'cts',
|
|
10
|
+
];
|
|
2
11
|
const TEST_FILE_PATTERNS = [
|
|
3
12
|
/\/(benchmark|__mocks__|__tests__|test|storybook|stories)\/.+/,
|
|
4
13
|
new RegExp( `\\.(spec|test)\\.(${ SOURCE_EXTENSIONS.join( '|' ) })$` ),
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { describe, expect, test } from 'vitest';
|
|
2
|
+
import { compileInlineStyle } from '../compile-inline-style.mjs';
|
|
3
|
+
|
|
4
|
+
async function compileStyleModule() {
|
|
5
|
+
return compileInlineStyle( { minify: false } )(
|
|
6
|
+
'.fixture { color: rgb(1, 2, 3); }',
|
|
7
|
+
import.meta.dirname,
|
|
8
|
+
`${ import.meta.dirname }/fixture.css`
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function executeStyleModule( source, processValue ) {
|
|
13
|
+
let injectedStyleCount = 0;
|
|
14
|
+
const document = {
|
|
15
|
+
createElement: () => ( {
|
|
16
|
+
appendChild() {},
|
|
17
|
+
setAttribute() {},
|
|
18
|
+
} ),
|
|
19
|
+
createTextNode: () => ( {} ),
|
|
20
|
+
head: {
|
|
21
|
+
appendChild: () => {
|
|
22
|
+
injectedStyleCount++;
|
|
23
|
+
},
|
|
24
|
+
querySelector: () => null,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
new Function( 'document', 'process', source )( document, processValue );
|
|
29
|
+
|
|
30
|
+
return injectedStyleCount;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
describe( 'compileInlineStyle', () => {
|
|
34
|
+
test( 'applies design token fallbacks by default', async () => {
|
|
35
|
+
const source = await compileInlineStyle( { minify: false } )(
|
|
36
|
+
'.fixture { gap: var(--wpds-dimension-gap-sm); }',
|
|
37
|
+
import.meta.dirname,
|
|
38
|
+
`${ import.meta.dirname }/fixture.css`
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
expect( source ).toContain( 'var(--wpds-dimension-gap-sm, 8px)' );
|
|
42
|
+
} );
|
|
43
|
+
|
|
44
|
+
test( 'skips generated style injection in test mode', async () => {
|
|
45
|
+
const source = await compileStyleModule();
|
|
46
|
+
|
|
47
|
+
expect(
|
|
48
|
+
executeStyleModule( source, {
|
|
49
|
+
env: { NODE_ENV: 'test' },
|
|
50
|
+
} )
|
|
51
|
+
).toBe( 0 );
|
|
52
|
+
} );
|
|
53
|
+
|
|
54
|
+
test( 'injects generated styles outside test mode', async () => {
|
|
55
|
+
const source = await compileStyleModule();
|
|
56
|
+
|
|
57
|
+
expect(
|
|
58
|
+
executeStyleModule( source, {
|
|
59
|
+
env: { NODE_ENV: 'development' },
|
|
60
|
+
} )
|
|
61
|
+
).toBe( 1 );
|
|
62
|
+
} );
|
|
63
|
+
|
|
64
|
+
test( 'injects generated styles when process is absent', async () => {
|
|
65
|
+
const source = await compileStyleModule();
|
|
66
|
+
|
|
67
|
+
expect( executeStyleModule( source, undefined ) ).toBe( 1 );
|
|
68
|
+
} );
|
|
69
|
+
} );
|
package/lib/test/source-files.js
CHANGED
|
@@ -22,7 +22,17 @@ describe( 'source file discovery', () => {
|
|
|
22
22
|
const sourceDirectory = path.join( temporaryDirectory, 'src' );
|
|
23
23
|
mkdirSync( sourceDirectory );
|
|
24
24
|
|
|
25
|
-
for ( const extension of [
|
|
25
|
+
for ( const extension of [
|
|
26
|
+
'js',
|
|
27
|
+
'jsx',
|
|
28
|
+
'mjs',
|
|
29
|
+
'cjs',
|
|
30
|
+
'ts',
|
|
31
|
+
'tsx',
|
|
32
|
+
'mts',
|
|
33
|
+
'cts',
|
|
34
|
+
'css',
|
|
35
|
+
] ) {
|
|
26
36
|
writeFileSync(
|
|
27
37
|
path.join( sourceDirectory, `index.${ extension }` ),
|
|
28
38
|
''
|
|
@@ -34,9 +44,12 @@ describe( 'source file discovery', () => {
|
|
|
34
44
|
} );
|
|
35
45
|
|
|
36
46
|
expect( sourceFiles.sort() ).toEqual( [
|
|
47
|
+
'src/index.cjs',
|
|
48
|
+
'src/index.cts',
|
|
37
49
|
'src/index.js',
|
|
38
50
|
'src/index.jsx',
|
|
39
51
|
'src/index.mjs',
|
|
52
|
+
'src/index.mts',
|
|
40
53
|
'src/index.ts',
|
|
41
54
|
'src/index.tsx',
|
|
42
55
|
] );
|
|
@@ -46,6 +59,8 @@ describe( 'source file discovery', () => {
|
|
|
46
59
|
'packages/example/src/test/component.jsx',
|
|
47
60
|
'packages/example/src/component.test.jsx',
|
|
48
61
|
'packages/example/src/component.spec.mjs',
|
|
62
|
+
'packages/example/src/component.test.mts',
|
|
63
|
+
'packages/example/src/component.spec.cts',
|
|
49
64
|
] )( 'identifies development-only source: %s', ( filename ) => {
|
|
50
65
|
expect( isTestSourceFile( filename ) ).toBe( true );
|
|
51
66
|
} );
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { expect, test } from 'vitest';
|
|
2
|
+
// The test config supplies this module from wp-build's real CSS transform.
|
|
3
|
+
// eslint-disable-next-line import/no-unresolved
|
|
4
|
+
import styles from 'virtual:wp-build-style-injection';
|
|
5
|
+
// eslint-disable-next-line import/no-unresolved
|
|
6
|
+
import 'virtual:wp-build-ordinary-style-injection';
|
|
7
|
+
|
|
8
|
+
test( 'injects wp-build generated styles in Browser Mode', () => {
|
|
9
|
+
const fixture = document.createElement( 'div' );
|
|
10
|
+
fixture.className = styles.fixture;
|
|
11
|
+
document.body.append( fixture );
|
|
12
|
+
|
|
13
|
+
try {
|
|
14
|
+
expect( globalThis.getComputedStyle( fixture ).color ).toBe(
|
|
15
|
+
'rgb(1, 2, 3)'
|
|
16
|
+
);
|
|
17
|
+
} finally {
|
|
18
|
+
fixture.remove();
|
|
19
|
+
}
|
|
20
|
+
} );
|
|
21
|
+
|
|
22
|
+
test( 'injects wp-build generated ordinary styles in Browser Mode', () => {
|
|
23
|
+
const fixture = document.createElement( 'div' );
|
|
24
|
+
fixture.className = 'ordinary-fixture';
|
|
25
|
+
document.body.append( fixture );
|
|
26
|
+
|
|
27
|
+
try {
|
|
28
|
+
expect( globalThis.getComputedStyle( fixture ).backgroundColor ).toBe(
|
|
29
|
+
'rgb(4, 5, 6)'
|
|
30
|
+
);
|
|
31
|
+
} finally {
|
|
32
|
+
fixture.remove();
|
|
33
|
+
}
|
|
34
|
+
} );
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { expect, test } from 'vitest';
|
|
2
|
+
// The test config supplies this module from wp-build's real CSS transform.
|
|
3
|
+
// eslint-disable-next-line import/no-unresolved
|
|
4
|
+
import styles from 'virtual:wp-build-style-injection';
|
|
5
|
+
|
|
6
|
+
test( 'does not inject wp-build generated styles in jsdom', () => {
|
|
7
|
+
expect( styles.fixture ).toBeTruthy();
|
|
8
|
+
expect( document.head ).not.toHaveTextContent(
|
|
9
|
+
'--wp-build-style-injection-test'
|
|
10
|
+
);
|
|
11
|
+
} );
|
package/lib/widget-utils.mjs
CHANGED
|
@@ -43,6 +43,15 @@ export function getAllWidgets( rootDir ) {
|
|
|
43
43
|
* @property {boolean} [openInNewTab] Open the destination in a new browser tab.
|
|
44
44
|
*/
|
|
45
45
|
|
|
46
|
+
/**
|
|
47
|
+
* @typedef {Object} WidgetAttributeMetadata
|
|
48
|
+
* @property {string} id Attribute key, unique within the widget.
|
|
49
|
+
* @property {string} [type] DataViews field type, or a registered field type name.
|
|
50
|
+
* @property {string} [label] Human-readable label. Translatable.
|
|
51
|
+
* @property {string} [description] Longer description. Translatable.
|
|
52
|
+
* @property {'high'|'medium'|'low'} [relevance] How prominently a host surfaces the attribute.
|
|
53
|
+
*/
|
|
54
|
+
|
|
46
55
|
/**
|
|
47
56
|
* @typedef {Object} WidgetMetadata
|
|
48
57
|
* @property {string} name Widget namespaced identifier.
|
|
@@ -51,6 +60,7 @@ export function getAllWidgets( rootDir ) {
|
|
|
51
60
|
* @property {WidgetHelpMetadata} [help] Contextual help note for compact surfaces.
|
|
52
61
|
* @property {string} [icon] Registered icon name (`collection/icon-name`).
|
|
53
62
|
* @property {WidgetActionMetadata[]} [actions] Declarative actions the widget exposes.
|
|
63
|
+
* @property {WidgetAttributeMetadata[]} [attributes] Attribute schema, the JSON-expressible subset of a DataViews `Field`.
|
|
54
64
|
* @property {string} [category] Grouping category.
|
|
55
65
|
* @property {'framed' | 'content-bleed' | 'full-bleed'} [presentation] Authoring intent about how the widget wants to render.
|
|
56
66
|
* @property {string[]} [keywords] Search aliases used to match the widget.
|
|
@@ -96,7 +106,16 @@ export function getWidgetMetadata( rootDir, widgetName ) {
|
|
|
96
106
|
* Supported source extensions for widget entry files, in priority order.
|
|
97
107
|
* Must stay aligned with SOURCE_EXTENSIONS in build.mjs.
|
|
98
108
|
*/
|
|
99
|
-
const WIDGET_EXTENSIONS = [
|
|
109
|
+
const WIDGET_EXTENSIONS = [
|
|
110
|
+
'tsx',
|
|
111
|
+
'ts',
|
|
112
|
+
'mts',
|
|
113
|
+
'cts',
|
|
114
|
+
'jsx',
|
|
115
|
+
'js',
|
|
116
|
+
'mjs',
|
|
117
|
+
'cjs',
|
|
118
|
+
];
|
|
100
119
|
|
|
101
120
|
/**
|
|
102
121
|
* @typedef {Object} WidgetFiles
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/build",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "Build tool for WordPress plugins.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -20,8 +20,7 @@
|
|
|
20
20
|
"url": "https://github.com/WordPress/gutenberg/issues"
|
|
21
21
|
},
|
|
22
22
|
"engines": {
|
|
23
|
-
"node": ">=20.10.0"
|
|
24
|
-
"npm": ">=10.2.3"
|
|
23
|
+
"node": ">=20.10.0"
|
|
25
24
|
},
|
|
26
25
|
"type": "module",
|
|
27
26
|
"module": "./lib/build.mjs",
|
|
@@ -36,10 +35,10 @@
|
|
|
36
35
|
},
|
|
37
36
|
"dependencies": {
|
|
38
37
|
"@emotion/babel-plugin": "^11.13.5",
|
|
39
|
-
"@wordpress/browserslist-config": "^6.
|
|
40
|
-
"@wordpress/style-runtime": "^0.
|
|
38
|
+
"@wordpress/browserslist-config": "^6.56.0",
|
|
39
|
+
"@wordpress/style-runtime": "^0.12.0",
|
|
41
40
|
"autoprefixer": "^10.4.21",
|
|
42
|
-
"browserslist": "^4.28.
|
|
41
|
+
"browserslist": "^4.28.7",
|
|
43
42
|
"browserslist-to-esbuild": "^2.1.1",
|
|
44
43
|
"change-case": "^4.1.2",
|
|
45
44
|
"chokidar": "^4.0.0",
|
|
@@ -55,8 +54,9 @@
|
|
|
55
54
|
"sass-embedded": "^1.97.2"
|
|
56
55
|
},
|
|
57
56
|
"devDependencies": {
|
|
58
|
-
"@types/node": "^
|
|
59
|
-
"
|
|
57
|
+
"@types/node": "^24.13.3",
|
|
58
|
+
"@wordpress/theme": "^2.2.0",
|
|
59
|
+
"vitest": "^5.0.0"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"@wordpress/boot": ">=0.3.0 <1.0.0",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"publishConfig": {
|
|
82
82
|
"access": "public"
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "56d8058eda6e30c4cc8bfc37818fa6ed972f7dc2"
|
|
85
85
|
}
|
package/tsconfig.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/tsconfig.json",
|
|
3
|
-
"extends": "
|
|
3
|
+
"extends": "@wordpress/monorepo-tools/tsconfig/base.json",
|
|
4
4
|
"compilerOptions": {
|
|
5
5
|
"module": "node16",
|
|
6
6
|
"moduleResolution": "node16",
|
|
@@ -17,7 +17,10 @@
|
|
|
17
17
|
"noEmit": true,
|
|
18
18
|
"outDir": ".cache"
|
|
19
19
|
},
|
|
20
|
-
"references": [
|
|
20
|
+
"references": [
|
|
21
|
+
{ "path": "../style-runtime/tsconfig.build.json" },
|
|
22
|
+
{ "path": "../theme/tsconfig.plugins.json" }
|
|
23
|
+
],
|
|
21
24
|
"include": [ "." ],
|
|
22
25
|
"exclude": [
|
|
23
26
|
// Excluded to maintain consistency with bin/tsconfig.json
|