@nlabs/lex 1.59.0 → 1.59.3
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/lib/commands/build/build.d.ts +2 -2
- package/package.json +51 -46
- package/webpack.config.js +37 -26
|
@@ -16,7 +16,7 @@ export interface BuildOptions {
|
|
|
16
16
|
readonly watch?: boolean;
|
|
17
17
|
}
|
|
18
18
|
export type BuildCallback = (status: number) => void;
|
|
19
|
-
export declare const buildWithSWC: (spinner: Spinner, commandOptions: BuildOptions, callback: BuildCallback) => Promise<
|
|
20
|
-
export declare const buildWithWebpack: (spinner: Spinner, cmd: Record<string, any>, callback: BuildCallback) => Promise<
|
|
19
|
+
export declare const buildWithSWC: (spinner: Spinner, commandOptions: BuildOptions, callback: BuildCallback) => Promise<0 | 1>;
|
|
20
|
+
export declare const buildWithWebpack: (spinner: Spinner, cmd: Record<string, any>, callback: BuildCallback) => Promise<0 | 1>;
|
|
21
21
|
export declare const build: (cmd: BuildOptions, callback?: BuildCallback) => Promise<number>;
|
|
22
22
|
export default build;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nlabs/lex",
|
|
3
|
-
"version": "1.59.
|
|
3
|
+
"version": "1.59.3",
|
|
4
4
|
"description": "Lex",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -87,30 +87,30 @@
|
|
|
87
87
|
"dependencies": {
|
|
88
88
|
"@mdx-js/loader": "^3.1.1",
|
|
89
89
|
"@nlabs/webpack-plugin-static-site": "*",
|
|
90
|
-
"@playwright/test": "^1.
|
|
91
|
-
"@storybook/addon-docs": "^10.4.
|
|
92
|
-
"@storybook/addon-links": "^10.4.
|
|
90
|
+
"@playwright/test": "^1.61.1",
|
|
91
|
+
"@storybook/addon-docs": "^10.4.6",
|
|
92
|
+
"@storybook/addon-links": "^10.4.6",
|
|
93
93
|
"@storybook/addon-styling-webpack": "^3.0.2",
|
|
94
|
-
"@storybook/addon-themes": "^10.4.
|
|
95
|
-
"@storybook/cli": "^10.4.
|
|
96
|
-
"@storybook/react": "^10.4.
|
|
97
|
-
"@storybook/react-webpack5": "^10.4.
|
|
94
|
+
"@storybook/addon-themes": "^10.4.6",
|
|
95
|
+
"@storybook/cli": "^10.4.6",
|
|
96
|
+
"@storybook/react": "^10.4.6",
|
|
97
|
+
"@storybook/react-webpack5": "^10.4.6",
|
|
98
98
|
"@swc/cli": "^0.8.1",
|
|
99
|
-
"@swc/core": "^1.15.
|
|
100
|
-
"@swc/react-compiler": "^1.15.
|
|
99
|
+
"@swc/core": "^1.15.43",
|
|
100
|
+
"@swc/react-compiler": "^1.15.43",
|
|
101
101
|
"@tailwindcss/forms": "^0.5.11",
|
|
102
102
|
"@tailwindcss/nesting": "^0.0.0-insiders.565cd3e",
|
|
103
|
-
"@tailwindcss/postcss": "4.3.
|
|
103
|
+
"@tailwindcss/postcss": "4.3.2",
|
|
104
104
|
"@testing-library/jest-dom": "^6.9.1",
|
|
105
105
|
"@testing-library/react": "^16.3.2",
|
|
106
|
-
"@vitest/coverage-v8": "^4.1.
|
|
106
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
107
107
|
"assert": "^2.1.0",
|
|
108
|
-
"autoprefixer": "^10.5.
|
|
108
|
+
"autoprefixer": "^10.5.2",
|
|
109
109
|
"boxen": "8.0.1",
|
|
110
110
|
"buffer": "^6.0.3",
|
|
111
|
-
"caniuse-lite": "1.0.
|
|
111
|
+
"caniuse-lite": "1.0.30001803",
|
|
112
112
|
"chalk": "^5.6.2",
|
|
113
|
-
"commander": "^
|
|
113
|
+
"commander": "^15.0.0",
|
|
114
114
|
"compare-versions": "^6.1.1",
|
|
115
115
|
"compression-webpack-plugin": "^12.0.0",
|
|
116
116
|
"copy-webpack-plugin": "^14.0.0",
|
|
@@ -118,11 +118,11 @@
|
|
|
118
118
|
"crypto-js": "^4.2.0",
|
|
119
119
|
"css-loader": "^7.1.4",
|
|
120
120
|
"css-minimizer-webpack-plugin": "^8.0.0",
|
|
121
|
-
"cssnano": "^8.0.
|
|
121
|
+
"cssnano": "^8.0.2",
|
|
122
122
|
"dotenv-webpack": "^9.0.0",
|
|
123
123
|
"download-npm-package": "^3.1.12",
|
|
124
|
-
"esbuild": "^0.28.
|
|
125
|
-
"eslint": "^10.
|
|
124
|
+
"esbuild": "^0.28.1",
|
|
125
|
+
"eslint": "^10.6.0",
|
|
126
126
|
"eslint-config-styleguidejs": "^5.0.4",
|
|
127
127
|
"execa": "9.6.1",
|
|
128
128
|
"expect": "^30.4.1",
|
|
@@ -131,24 +131,24 @@
|
|
|
131
131
|
"find-file-up": "^2.0.1",
|
|
132
132
|
"glob": "^13.0.6",
|
|
133
133
|
"global": "^4.4.0",
|
|
134
|
-
"graphql": "^
|
|
135
|
-
"graphql-tag": "^2.12.
|
|
134
|
+
"graphql": "^17.0.2",
|
|
135
|
+
"graphql-tag": "^2.12.7",
|
|
136
136
|
"html-loader": "^5.1.0",
|
|
137
137
|
"html-webpack-plugin": "^5.6.7",
|
|
138
138
|
"https-browserify": "^1.0.0",
|
|
139
|
-
"image-webpack-
|
|
139
|
+
"image-minimizer-webpack-plugin": "^5.0.0",
|
|
140
140
|
"jsdom": "^29.1.1",
|
|
141
141
|
"latest-version": "9.0.0",
|
|
142
142
|
"lodash": "^4.18.1",
|
|
143
143
|
"luxon": "^3.7.2",
|
|
144
144
|
"math-expression-evaluator": "^2.0.7",
|
|
145
145
|
"mini-css-extract-plugin": "^2.10.2",
|
|
146
|
-
"npm-check-updates": "^22.2.
|
|
147
|
-
"openai": "^6.
|
|
148
|
-
"ora": "9.4.
|
|
146
|
+
"npm-check-updates": "^22.2.9",
|
|
147
|
+
"openai": "^6.45.0",
|
|
148
|
+
"ora": "9.4.1",
|
|
149
149
|
"os-browserify": "^0.3.0",
|
|
150
150
|
"path-browserify": "^1.0.1",
|
|
151
|
-
"postcss": "^8.5.
|
|
151
|
+
"postcss": "^8.5.16",
|
|
152
152
|
"postcss-browser-reporter": "^0.7.0",
|
|
153
153
|
"postcss-cli": "^11.0.1",
|
|
154
154
|
"postcss-custom-properties": "^15.0.1",
|
|
@@ -157,61 +157,66 @@
|
|
|
157
157
|
"postcss-import": "16.1.1",
|
|
158
158
|
"postcss-loader": "^8.2.1",
|
|
159
159
|
"postcss-nesting": "^14.0.0",
|
|
160
|
-
"postcss-preset-env": "^11.3.
|
|
160
|
+
"postcss-preset-env": "^11.3.2",
|
|
161
161
|
"postcss-simple-vars": "^7.0.1",
|
|
162
|
-
"postcss-svgo": "8.0.
|
|
162
|
+
"postcss-svgo": "8.0.1",
|
|
163
163
|
"postcss-url": "10.1.4",
|
|
164
164
|
"postcss-value-parser": "^4.2.0",
|
|
165
165
|
"process": "^0.11.10",
|
|
166
166
|
"randombytes": "^2.1.0",
|
|
167
|
-
"react": "^19.2.
|
|
168
|
-
"react-dom": "^19.2.
|
|
167
|
+
"react": "^19.2.7",
|
|
168
|
+
"react-dom": "^19.2.7",
|
|
169
169
|
"regenerator-runtime": "^0.14.1",
|
|
170
170
|
"resolve": "^1.22.12",
|
|
171
171
|
"rimraf": "^6.1.3",
|
|
172
|
-
"semver": "^7.8.
|
|
172
|
+
"semver": "^7.8.5",
|
|
173
|
+
"sharp": "^0.35.3",
|
|
173
174
|
"source-map-loader": "^5.0.0",
|
|
174
|
-
"storybook": "^10.4.
|
|
175
|
+
"storybook": "^10.4.6",
|
|
175
176
|
"stream-browserify": "^3.0.0",
|
|
176
177
|
"stream-http": "^3.2.0",
|
|
177
178
|
"style-loader": "^4.0.0",
|
|
178
179
|
"svgo": "4.0.1",
|
|
179
180
|
"swc-loader": "^0.2.7",
|
|
180
|
-
"tailwindcss": "^4.3.
|
|
181
|
+
"tailwindcss": "^4.3.2",
|
|
181
182
|
"ts-node": "^10.9.2",
|
|
182
183
|
"tsconfig-paths-webpack-plugin": "^4.2.0",
|
|
183
184
|
"typescript": "^6.0.3",
|
|
184
185
|
"util": "^0.12.5",
|
|
185
|
-
"vitest": "^4.1.
|
|
186
|
+
"vitest": "^4.1.10",
|
|
186
187
|
"vm-browserify": "^1.1.2",
|
|
187
|
-
"webpack": "5.
|
|
188
|
+
"webpack": "5.108.4",
|
|
188
189
|
"webpack-bundle-analyzer": "^5.3.0",
|
|
189
|
-
"webpack-cli": "^7.
|
|
190
|
+
"webpack-cli": "^7.2.1",
|
|
190
191
|
"webpack-merge": "^6.0.1",
|
|
191
192
|
"webpack-plugin-serve": "^1.6.0",
|
|
192
193
|
"ws": "^8.21.0"
|
|
193
194
|
},
|
|
194
195
|
"devDependencies": {
|
|
195
196
|
"@types/express": "^5.0.6",
|
|
196
|
-
"@types/luxon": "^3.7.
|
|
197
|
-
"@types/node": "^
|
|
197
|
+
"@types/luxon": "^3.7.2",
|
|
198
|
+
"@types/node": "^26.1.0",
|
|
198
199
|
"@types/ora": "^3.2.0",
|
|
199
|
-
"@types/react": "^19.2.
|
|
200
|
+
"@types/react": "^19.2.17",
|
|
200
201
|
"@types/webpack": "^5.28.5"
|
|
201
202
|
},
|
|
202
203
|
"overrides": {
|
|
204
|
+
"@babel/core": "^7.29.7",
|
|
205
|
+
"@xhmikosr/decompress": "^11.1.3",
|
|
206
|
+
"brace-expansion": "^5.0.7",
|
|
203
207
|
"cross-spawn": "^7.0.6",
|
|
204
|
-
"fast-uri": "^3.1.2",
|
|
205
|
-
"fast-xml-builder": "^1.2.0",
|
|
206
208
|
"fast-xml-parser": "^5.8.0",
|
|
207
209
|
"got": "^14.6.6",
|
|
208
|
-
"
|
|
209
|
-
"
|
|
210
|
-
"
|
|
211
|
-
"
|
|
210
|
+
"http-proxy-middleware": "^3.0.7",
|
|
211
|
+
"js-yaml": "^4.3.0",
|
|
212
|
+
"piscina": "^4.9.3",
|
|
213
|
+
"qs": "^6.15.3",
|
|
212
214
|
"semver-regex": "^4.0.5",
|
|
213
|
-
"tmp": "^0.2.
|
|
214
|
-
"
|
|
215
|
+
"tmp": "^0.2.7",
|
|
216
|
+
"undici": "^7.28.0",
|
|
217
|
+
"webpack-plugin-serve": {
|
|
218
|
+
"ws": "^7.5.11"
|
|
219
|
+
}
|
|
215
220
|
},
|
|
216
221
|
"gitHead": "0f5fb22fc0f0ab1abab5adf62afed24c7c87e4a8"
|
|
217
222
|
}
|
package/webpack.config.js
CHANGED
|
@@ -15,6 +15,7 @@ import FaviconsWebpackPlugin from 'favicons-webpack-plugin';
|
|
|
15
15
|
import {existsSync} from 'fs';
|
|
16
16
|
import {sync as globSync} from 'glob';
|
|
17
17
|
import HtmlWebPackPlugin from 'html-webpack-plugin';
|
|
18
|
+
import ImageMinimizerPlugin from 'image-minimizer-webpack-plugin';
|
|
18
19
|
import isEmpty from 'lodash/isEmpty.js';
|
|
19
20
|
import {createRequire} from 'module';
|
|
20
21
|
import {resolve as pathResolve} from 'path';
|
|
@@ -558,31 +559,7 @@ export default (webpackEnv, webpackOptions) => {
|
|
|
558
559
|
type: 'asset/resource',
|
|
559
560
|
generator: {
|
|
560
561
|
filename: '[name].[hash][ext]'
|
|
561
|
-
}
|
|
562
|
-
use: isProduction ? [
|
|
563
|
-
{
|
|
564
|
-
loader: 'image-webpack-loader',
|
|
565
|
-
options: {
|
|
566
|
-
mozjpeg: {
|
|
567
|
-
progressive: true,
|
|
568
|
-
quality: 65
|
|
569
|
-
},
|
|
570
|
-
optipng: {
|
|
571
|
-
enabled: false
|
|
572
|
-
},
|
|
573
|
-
pngquant: {
|
|
574
|
-
quality: [0.65, 0.90],
|
|
575
|
-
speed: 4
|
|
576
|
-
},
|
|
577
|
-
gifsicle: {
|
|
578
|
-
interlaced: false
|
|
579
|
-
},
|
|
580
|
-
webp: {
|
|
581
|
-
quality: 75
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
] : []
|
|
562
|
+
}
|
|
586
563
|
},
|
|
587
564
|
{
|
|
588
565
|
test: /\.json$/,
|
|
@@ -607,7 +584,41 @@ export default (webpackEnv, webpackOptions) => {
|
|
|
607
584
|
isProduction && isWeb
|
|
608
585
|
? {
|
|
609
586
|
minimizer: [
|
|
610
|
-
new CssMinimizerPlugin()
|
|
587
|
+
new CssMinimizerPlugin(),
|
|
588
|
+
new ImageMinimizerPlugin({
|
|
589
|
+
include: staticPathFull,
|
|
590
|
+
minimizer: [
|
|
591
|
+
{
|
|
592
|
+
filter: (_source, sourcePath) => /\.(gif|jpe?g|png|webp)$/i.test(sourcePath),
|
|
593
|
+
implementation: ImageMinimizerPlugin.sharpMinify,
|
|
594
|
+
options: {
|
|
595
|
+
encodeOptions: {
|
|
596
|
+
jpeg: {
|
|
597
|
+
progressive: true,
|
|
598
|
+
quality: 65
|
|
599
|
+
},
|
|
600
|
+
png: {
|
|
601
|
+
quality: 90
|
|
602
|
+
},
|
|
603
|
+
webp: {
|
|
604
|
+
quality: 75
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
filter: (_source, sourcePath) => /\.svg$/i.test(sourcePath),
|
|
611
|
+
implementation: ImageMinimizerPlugin.svgoMinify,
|
|
612
|
+
options: {
|
|
613
|
+
encodeOptions: {
|
|
614
|
+
multipass: true,
|
|
615
|
+
plugins: ['preset-default']
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
],
|
|
620
|
+
test: /\.(gif|jpe?g|png|svg|webp)$/i
|
|
621
|
+
})
|
|
611
622
|
],
|
|
612
623
|
runtimeChunk: 'single',
|
|
613
624
|
splitChunks: {
|