Releases: swissquote/crafty
1.27.0
Highlights
- Remove
stylelint-no-unsupported-browser-features
as it is unmaintained - Support TypeScript 5.5
Internal changes
- fork
gulp-babel
andgulp-concat
as they are unmaintained - Replace
gulp-plumber
withstream-plumber
Renovate updates
- Update JamesIves/github-pages-deploy-action action to v4.6.1 by @renovate in #2366
- Pin dependencies by @renovate in #2365
- Update dependency @swc/core to v1.5.7 by @renovate in #2367
- Update dependency caniuse-lite to v1.0.30001620 by @renovate in #2368
- Update dependency fast-xml-parser to v4.4.0 - autoclosed by @renovate in #2370
- Update dependency @types/react to v18.3.3 by @renovate in #2372
- Update dependency caniuse-lite to v1.0.30001621 by @renovate in #2373
- Update dependency css-loader to v7.1.2 - autoclosed by @renovate in #2374
- Update dependency micromatch to v4.0.7 by @renovate in #2375
- Update dependency ts-jest to v29.1.3 by @renovate in #2376
- Update dependency caniuse-lite to v1.0.30001623 - autoclosed by @renovate in #2377
- Update all eslint dependencies by @renovate in #2378
- Update dependency postcss-selector-parser to v6.1.0 by @renovate in #2380
- Update dependency @pmmmwh/react-refresh-webpack-plugin to v0.5.15 by @renovate in #2381
- Update dependency @swc/core to v1.5.24 by @renovate in #2382
- Update dependency typescript-eslint to v7.12.0 by @renovate in #2384
- Update dependency caniuse-lite to v1.0.30001628 by @renovate in #2383
- Update babel monorepo to v7.24.7 by @renovate in #2371
- Update dependency @swc/core to v1.5.25 by @renovate in #2385
- Update dependency browserslist to v4.23.1 by @renovate in #2386
- Update dependency terser to v5.31.1 by @renovate in #2388
- Update dependency tslib to v2.6.3 by @renovate in #2389
- Update dependency enhanced-resolve to v5.17.0 by @renovate in #2390
- Update dependency @swc/core to v1.5.27 by @renovate in #2391
- Update dependency typescript-eslint to v7.13.0 by @renovate in #2392
- Update Yarn to v4.3.0 by @renovate in #2393
- Update dependency caniuse-lite to v1.0.30001633 by @renovate in #2387
- Update dependency caniuse-lite to v1.0.30001636 by @renovate in #2394
- Update dependency @swc/core to v1.6.1 by @renovate in #2396
- Update dependency ts-jest to v29.1.5 by @renovate in #2395
- Update dependency typescript-eslint to v7.13.1 by @renovate in #2398
- Update Yarn to v4.3.1 by @renovate in #2399
- Update dependency @swc/core to v1.6.5 by @renovate in #2400
- Update dependency eslint-plugin-react to v7.34.3 by @renovate in #2401
- Update dependency typescript to v5.5.2 by @renovate in #2402
- Update dependency typescript-eslint to v7.14.1 by @renovate in #2403
- Update dependency @swc/core to v1.6.6 by @renovate in #2404
- Update dependency caniuse-lite to v1.0.30001639 by @renovate in #2405
- Update dependency postcss to v8.4.39 by @renovate in #2406
- Update dependency typescript-eslint to v7.15.0 by @renovate in #2407
- Update dependency typescript to v5.5.3 by @renovate in #2408
- Update JamesIves/github-pages-deploy-action action to v4.6.3 by @renovate in #2409
- Update dependency caniuse-lite to v1.0.30001640 by @renovate in #2411
- Update dependency rimraf to v5.0.8 by @renovate in #2412
- Update dependency ts-jest to v29.2.0 by @renovate in #2413
- Update dependency typescript-eslint to v7.16.0 by @renovate in #2414
- Update dependency rimraf to v5.0.9 by @renovate in #2415
- Update actions/setup-node action to v4.0.3 by @renovate in #2416
- Update dependency @babel/core to v7.24.9 by @renovate in #2417
- Update dependency typescript-eslint to v7.16.1 by @renovate in #2418
- Update dependency @swc/core to v1.7.0 by @renovate in #2410
- Update dependency caniuse-lite to v1.0.30001643 by @renovate in #2419
- Update dependency semver to v7.6.3 by @renovate in #2420
- Update dependency postcss-nested to v6.2.0 by @renovate in #2424
- Update dependency eslint-plugin-react to v7.35.0 by @renovate in #2423
- Update dependency ts-jest to v29.2.3 by @renovate in #2422
- Update dependency terser to v5.31.3 by @renovate in #2421
- Update dependency @types/eslint to v8.56.11 by @renovate in #2425
- Update dependency typescript-eslint to v7.17.0 by @renovate in #2426
- Update dependency @swc/core to v1.7.3 by @renovate in #2427
- Update dependency debug to v4.3.6 by @renovate in #2428
- Update dependency enhanced-resolve to v5.17.1 by @renovate in #2429
- Update dependency fast-xml-parser to v4.4.1 by @renovate in #2430
- Update dependency typescript to v5.5.4 by @renovate in #2431
- Update postcss by @renovate in #2432
- Update babel monorepo to v7.25.0 by @renovate in #2433
- Update dependency typescript-eslint to v7.18.0 by @renovate in #2434
- Update dependency @swc/core to v1.7.6 by @renovate in #2435
- Update dependency browserslist to v4.23.3 by @renovate in #2436
- Update dependency caniuse-lite to v1.0.30001649 by @renovate in #2437
- Update dependency rimraf to v5.0.10 by @renovate in #2438
- Update dependency ts-jest to v29.2.4 by @renovate in #2439
- Update actions/setup-java action to v4.2.2 by @renovate in #2442
- Update Yarn to v4.4.0 by @renovate in #2440
- Update babel monorepo by @renovate in #2441
- Update dependency @onigoetz/resquoosh to v1.1.1 by @renovate in #2443
- Update dependency @onigoetz/stream-plumber to v1.0.1 by @renovate in #2444
- Update dependency @swc/core to v1.7.10 by @renovate in #2445
- Update dependency caniuse-lite to v1.0.30001651 by @renovate in #2446
- Update dependency terser to v5.31.5 by @renovate in #2447
- Update postcss by @renovate in #2448
- Update dependency lightningcss to v1.26.0 by @renovate in #2449
- Update dependency terser to v5.31.6 by @renovate in #2451
- Update dependency @swc/core to v1.7.12 by @renovate in #2450
- Update dependency mini-css-extract-plugin to v2.9.1 by @renovate in #2453
- Update Yarn to v4.4.1 by @renovate in #2454
- Update dependency @types/react to v18.3.4 by @renovate in #2457
- Update dependency micromatch to v4.0.8 [SECURITY] by @renovate in #2456
- Update babel monorepo to v7.25.4 by @renovate in #2455
- Update dependency caniuse-lite to v1.0.30001653 by @renovate in #2458
- Update dependency @types/eslint to v8.56.12 by @renovate in https://github.co...
v1.26.0
Highlights
- Bugfix on postcss when using AGGrid. #2329 thanks to @linkmagic for the bug report
- update of css-loader that requires a small change when using CSS Modules
- various package updates, including
CSS modules changes
css-loader
v7 introduced a change that requires the following change in all your CSS module imports:
- import styles from "./Component.module.css";
+ import * as styles from "./Component.module.css";
What's Changed
- Update @types by @renovate in #2286
- Update dependency caniuse-lite to v1.0.30001593 by @renovate in #2287
- Update dependency tmp to v0.2.3 by @renovate in #2288
- Update dependency eslint-plugin-react to v7.34.0 by @renovate in #2290
- Update actions/setup-java action to v4.1.0 by @renovate in #2289
- Update dependency @types/react to v18.2.62 by @renovate in #2291
- Update dependency typescript-eslint to v7.1.1 by @renovate in #2292
- Update @types to v18.2.64 by @renovate in #2293
- Update dependency @swc/core to v1.4.6 by @renovate in #2295
- Update Yarn to v4.1.1 by @renovate in #2294
- Update dependency terser to v5.29.1 by @renovate in #2297
- Update dependency typescript to v5.4.2 by @renovate in #2298
- Update dependency enhanced-resolve to v5.16.0 by @renovate in #2299
- Update dependency typescript-eslint to v7.2.0 by @renovate in #2300
- Update @types to v18.2.66 by @renovate in #2302
- Update dependency eslint-plugin-react to v7.34.1 by @renovate in #2304
- Update dependency fast-xml-parser to v4.3.6 by @renovate in #2305
- Update dependency lightningcss to v1.24.1 by @renovate in #2306
- Update dependency terser to v5.29.2 by @renovate in #2307
- Update swc monorepo - autoclosed by @renovate in #2303
- Update postcss by @renovate in #2309
- Update dependency @types/react to v18.2.67 by @renovate in #2308
- Update actions/setup-java action to v4.2.1 by @renovate in #2310
- Update dependency source-map-js to v1.1.0 by @renovate in #2312
- Update all eslint dependencies by @renovate in #2311
- Update @types by @renovate in #2313
- Update dependency postcss to v8.4.38 by @renovate in #2314
- Update dependency typescript-eslint to v7.3.1 by @renovate in #2316
- Update dependency typescript to v5.4.3 by @renovate in #2315
- Update dependency source-map-js to v1.2.0 by @renovate in #2318
- Update dependency @types/react to v18.2.71 by @renovate in #2319
- Update @types to v18.2.73 by @renovate in #2320
- Update swc monorepo by @renovate in #2321
- Update dependency terser to v5.30.0 by @renovate in #2322
- Update dependency typescript-eslint to v7.4.0 by @renovate in #2323
- Update dependency @types/eslint to v8.56.7 by @renovate in #2324
- Update dependency terser to v5.30.1 by @renovate in #2325
- Update dependency webpack to v5.91.0 by @renovate in #2326
- Update dependency caniuse-lite to v1.0.30001607 by @renovate in #2296
- Update dependency css-loader to v7.1.0 by @renovate in #2327
- Update dependency typescript-eslint to v7.6.0 by @renovate in #2328
- Fgw doc improvements by @JonathanLink in #2330
- Update @types by @renovate in #2331
- Update dependency typescript to v5.4.5 by @renovate in #2334
- Update dependency caniuse-lite to v1.0.30001610 - autoclosed by @renovate in #2332
- Update dependency css-loader to v7.1.1 by @renovate in #2333
- Update swc monorepo by @renovate in #2336
- Update dependency webpack-bundle-analyzer to v4.10.2 by @renovate in #2335
- Update dependency @swc/helpers to v0.5.10 by @renovate in #2337
- Update dependency typescript-eslint to v7.7.0 by @renovate in #2338
- Update @types by @renovate in #2339
- Update JamesIves/github-pages-deploy-action action to v4.6.0 by @renovate in #2342
- Update dependency caniuse-lite to v1.0.30001612 by @renovate in #2341
- Update dependency mini-css-extract-plugin to v2.9.0 by @renovate in #2343
- Update dependency serve to v14.2.2 by @renovate in #2344
- Update dependency terser to v5.30.4 by @renovate in #2345
- Update dependency typescript-eslint to v7.7.1 by @renovate in #2346
- Update dependency @pmmmwh/react-refresh-webpack-plugin to v0.5.13 by @renovate in #2347
- Update dependency eslint-plugin-react-hooks to v4.6.2 by @renovate in #2349
- Update dependency caniuse-lite to v1.0.30001614 by @renovate in #2348
- Update dependency serve to v14.2.3 by @renovate in #2350
- Update @types to v18.3.1 by @renovate in #2351
- Update react monorepo by @renovate in #2352
- Update dependency terser to v5.31.0 by @renovate in #2353
- Update babel monorepo to v7.24.5 by @renovate in #2354
- Update dependency ava to v6.1.3 by @renovate in #2356
- Update dependency caniuse-lite to v1.0.30001616 by @renovate in #2357
- Update Yarn to v4.2.1 by @renovate in #2358
- Update Yarn to v4.2.2 by @renovate in #2359
- Update dependency @types/react to v18.3.2 by @renovate in #2360
- Update dependency semver to v7.6.2 by @renovate in #2363
- Update dependency rimraf to v5.0.7 - autoclosed by @renovate in #2362
- Update dependency caniuse-lite to v1.0.30001617 by @renovate in #2361
- Update dependency utf-8-validate to v6.0.4 by @renovate in #2364
- Update dependency typescript-eslint to v7.9.0 by @renovate in #2355
- Update dependency @swc/core to v1.5.6 by @renovate in #2340
New Contributors
- @JonathanLink made their first contribution in #2330
Full Changelog: v1.25.0...v1.26.0
v1.25.0
Highlights
- Support Prettier 3 #2137 #2251
- Add support for custom configuration in
devServer
#2285 - Fix incorrect Jest environment #2281
- CSS Modules: Fix Webpack issues and improve CSS linting configuration #2275 #2284
- Disable
@swissquote/swissquote/react/prop-types
in TypeScript files #2216 - Support
paths
configuration in TypeScript #2066 - Add
tsconfigFile
option to JS bundles to specify a customtsconfig.json
Prettier 3
Prettier 3 supports syntax for TypeScript 5.2 and 5.3 such as import assertions and resource management
eslint: {
settings: {
"formatting/mode": "prettier:3",
},
},
Improved TS Support
Webpack and ESLint support TypeScript's "paths"
options.
You can also change the tsconfig.json
by setting tsconfigFile
in the bundle options.
What's Changed
- Update actions/setup-node action to v4.0.1 by @renovate in #2252
- Update dependency caniuse-lite to v1.0.30001571 by @renovate in #2253
- Update dependency @types/eslint to v8.56.0 by @renovate in #2254
- Update dependency mrmime to v2 by @renovate in #2255
- Update @types by @renovate in #2256
- Update babel monorepo to v7.23.7 by @renovate in #2257
- Update dependency @types/react to v18.2.55 by @renovate in #2261
- Update actions/setup-node action to v4.0.2 by @renovate in #2262
- Update dependency @types/react-dom to v18.2.19 by @renovate in #2263
- Update dependency caniuse-lite to v1.0.30001585 by @renovate in #2264
- Update dependency gulp-eslint-new to v1.9.1 by @renovate in #2265
- Update dependency caniuse-lite to v1.0.30001587 by @renovate in #2266
- Update dependency streamx to v2.15.8 by @renovate in #2267
- Update Yarn to v4.1.0 by @renovate in #2269
- Update dependency chokidar to v3.6.0 by @renovate in #2270
- Update dependency gulp-postcss to v10 by @renovate in #2271
- Update dependency @swc/core to v1.4.1 by @renovate in #2258
- Update dependency @types/react to v18.2.56 by @renovate in #2276
- Update dependency caniuse-lite to v1.0.30001588 by @renovate in #2277
- Update dependency @swc/core to v1.4.2 by @renovate in #2278
- Update dependency terser to v5.27.1 by @renovate in #2279
- Update dependency typescript-eslint to v7.1.0 by @renovate in #2282
- Update dependency @types/react to v18.2.59 by @renovate in #2283
Full Changelog: v1.24.0...v1.25.0
v1.24.0
Highlights
- Drop Node 16 support
- Improve IDE mode #2215
- Update supported browsers list #2247
- Update to TypeScript 5.3
Drop Node 16 support
In alignment with Node.js release schedule, Crafty stops supporting Node 16, but supports version 18 and 20
Improve IDE Mode
When running crafty ide
a few files are created inside your repository so that your IDE knows you're using eslint/prettier/jest.
We got some feedback that this feature is confusing because every user needs to run it on their own machine.
Starting with this version, stylelint.config.mjs
, prettier.config.mjs
, and jest.config.mjs
are created in a commit-friendly way, it will no longer contain the content of the configuration but will allow to commit and get a pleasant out-of-the-box experience for newcomers
At this stage, this doesn't work for ESLint and this file should still not be committed, this is because ESLint's configuration is trickier and another change is ongoing for this one; #2250
Update supported browsers list
As is the case every year, we update the list of supported browsers. The browserslist
query is now the following:
Edge >= 96, Safari >= 15, iOS >= 15, Chrome >= 96, and_chr >= 96, Firefox >= 94, > 1%, not dead, not op_mini all
Update to TypeScript 5.3
As it is usual, TypeScript brings a lot of updates in this new version.
You can use all the new features of TypeScript 5.3 except for newly introduced syntax such as import attributes.
This is because Prettier 2 does not support it.
We are working on Prettier 3 support for Crafty to fix this.
What's Changed
- Update @types to v18.2.25 by @renovate in #2173
- Update Yarn to v3.6.4 by @renovate in #2182
- Update dependency @types/react-dom to v18.2.11 by @renovate in #2183
- Update dependency sinon to v16.1.0 by @renovate in #2187
- Update dependency eslint to v8.51.0 by @renovate in #2186
- Update swc monorepo by @renovate in #2185
- Update dependency caniuse-lite to v1.0.30001546 by @renovate in #2184
- Update dependency ts-loader to v9.5.0 by @renovate in #2188
- Update dependency @types/react to v18.2.26 by @renovate in #2191
- Update dependency fork-ts-checker-webpack-plugin to v9 by @renovate in #2190
- Update @types to v18.2.27 by @renovate in #2192
- Update eslint to v6.7.5 by @renovate in #2193
- Update @types by @renovate in #2194
- Update dependency bufferutil to v4.0.8 by @renovate in #2197
- Update babel monorepo to v7.23.2 by @renovate in #2195
- Update dependency @swc/core to v1.3.93 by @renovate in #2196
- Update dependency caniuse-lite to v1.0.30001549 by @renovate in #2198
- Update all webpack dependencies by @renovate in #2199
- Update dependency terser to v5.22.0 by @renovate in #2200
- Update all eslint dependencies to v6.8.0 by @renovate in #2201
- Update @types by @renovate in #2203
- Update dependency @ronilaukkarinen/gulp-stylelint to v14.1.2 by @renovate in #2204
- Update dependency @types/jest to v29.5.6 by @renovate in #2207
- Update dependency @statoscope/cli to v5.28.1 - autoclosed by @renovate in #2205
- Update dependency @swc/core to v1.3.94 by @renovate in #2206
- Update dependency @vercel/ncc to v0.38.1 by @renovate in #2208
- Update dependency caniuse-lite to v1.0.30001553 by @renovate in #2209
- Update actions/setup-node action to v3.8.2 by @renovate in #2211
- Update dependency @statoscope/cli to v5.28.2 by @renovate in #2213
- Update dependency sinon to v16.1.3 by @renovate in #2210
- Update all eslint dependencies by @renovate in #2212
- Update Yarn to v4 by @renovate in #2219
- Update actions/setup-node action to v4 by @renovate in #2220
- Update Yarn to v4.0.1 by @renovate in #2221
- Update dependency caniuse-lite to v1.0.30001558 by @renovate in #2223
- Update dependency @types/react to v18.2.33 - autoclosed by @renovate in #2222
- Update dependency fork-ts-checker-webpack-plugin to v9.0.2 by @renovate in #2224
- Update dependency stylelint-scss to v5.3.0 by @renovate in #2225
- Update dependency terser to v5.23.0 by @renovate in #2227
- Update dependency streamx to v2.15.2 by @renovate in #2228
- Update dependency log-symbols to v6 by @renovate in #2226
- Update eslint to v6.9.1 by @renovate in #2229
- Update dependency @types/jest to v29.5.7 by @renovate in #2231
- Update dependency sinon to v17 by @renovate in #2230
- Update dependency @swc/core to v1.3.96 by @renovate in #2232
- Update dependency @types/react to v18.2.35 by @renovate in #2233
- Update dependency sinon to v17.0.1 by @renovate in #2235
- Update dependency eslint to v8.53.0 by @renovate in #2236
- Update dependency terser to v5.24.0 by @renovate in #2237
- Update dependency @types/react to v18.2.36 by @renovate in #2238
- Update dependency @types/react to v18.2.43 by @renovate in #2241
- Update dependency stylelint-scss to v5.3.2 by @renovate in #2240
- Update Yarn to v4.0.2 by @renovate in #2242
- Update dependency caniuse-lite to v1.0.30001568 by @renovate in #2243
- Update JamesIves/github-pages-deploy-action action to v4.5.0 by @renovate in #2244
- Update actions/setup-java action to v4 by @renovate in #2245
- Update @types by @renovate in #2248
Full Changelog: v1.23.0...v1.24.0
1.23.0
Highlights
- Support Node 18 and 20
- Disable ESLint while in watch mode
- Remove
crafty-runner-rollup
as it wasn't used - Replace
@squoosh/lib
with@onigoetz/resquoosh
- Replace
gulp-typescript
with@onigoetz/gulp-typescript
- Support TypeScript 5.2 (formatting doesn't support new features such as
using
) - Disable
@swissquote/swissquote/import/first
since some test files needjest.mock
beforeimport
Updates
- webpack 5.88.2
- postcss 8.4.31
- Babel 7.23.0
- ESLint 8.50.0
- Jest 29.7.0
- lightningcss 1.22.0
- Stylelint 5.10.0
- TypeScript 5.2.2
Full Changelog: v1.22.3...v1.23.0
1.22.3
Highlights
- Don't remove vendor prefixes automatically when linting css with
--fix
as the result could be unpredictable.
Full Changelog: v1.22.2...v1.22.3
v1.22.2
Highlights
- Improvements in Crafty's internals for ESM
- Improvements in
crafty-preset-jest
for ESM
Improvements in Crafty's internals for ESM
- Rename crafty's binary to
bin.cjs
to force node to start it as CommonJS, allows to install it within an ESM module - new
crafty.runAllSync(method: string, ...args)
method to run all implementations of an extension within presets. - loaded presets are wrapped in a
CraftyPreset
class with the following methods:implements(method: string)
run(method: string, ...args)
get(property: string)
- load presets with
import()
. This allows future presets to be created as ESM modules
Improvements in crafty-preset-jest
for ESM
- Automatically detect when
package.json
containstype: "module"
- run Jest with Vmodules enabled
- don't transpile node dependencies that are using ESM
- transpile .ts, .tsx files to modules instead of commonjs
- Use
enhanced-resolve
to resolve modules in Jest, allows to set.mjs
and.cjs
to be aliases of.mts
and.cts
What's Changed
- @swc/core from 1.3.51 to 1.3.53
- postcss from 8.4.22 to 8.4.23
- eslint from 8.38.0 to 8.39.0
- stylelint from 15.5.0 to 15.6.0
- rollup from 30.20.6 to 3.21.0
- webpack from 5.79.0 to 5.80.0
Full Changelog: v1.22.1...v1.22.2
1.22.1
Highlights
- properly declare peerDependencies in packages needing them to avoid bad surprises when modules are installed
- Support compiling
.mjs
and.mts
files in gulp - Support testing
.mts
files with dependencies to other.mts
files. Same for.cts
Updates
- Update SWC from 1.3.49 to 1.3.51
- Update postcss from 8.4.21 to 8.4.22
Full Changelog: v1.22.0...v1.22.1
v1.22.0
Highlights
- Support for Prettier 2 and new TypeScript / EcmaScript syntax
- Replace Terser with SWC for faster minification in your builds, replace Babel with SWC in
crafty-preset-typescript
- TypeScript 5.0 support and other TypeScript improvements
- New
crafty-preset-lightningcss
as alternative tocrafty-preset-postcss
- Extract CSS linting into
crafty-preset-stylelint
- Webpack
--profile
and--analyze
options
Support for Prettier 2 and new TypeScript / EcmaScript syntax
Prettier 2.0 was released a while ago, introducing some new formatting rules that aren't backwards compatible. We've held off from upgrading for now as our internal Git hooks are using Crafty to autoformat code on commit. Upgrading Crafty to Prettier 2.0 would mean that all projects need to migrate as soon as the change is introduced.
Instead of this, we decided to bundle both Prettier 1 and Prettier 2 and let you opt-in to Prettier 2 at your own pace.
Since the release of Prettier 2.0, new features were added to TypeScript along with new syntax, such as import type ... from ...
. Support for these new features is present in Prettier 2.0 but not Prettier 1.0, if you wish to use those, you need to upgrade opt-in to Prettier 2
crafty.config.js
:
module.exports = {
eslint: {
settings: {
"formatting/mode": "prettier:2"
}
}
}
SWC for Minification and Transpilation
SWC Provides both transpiling and minification abilities, its architecture and the fact it's written in Rust makes it a strong contender compared to Babel and Terser.
First, we replaced the default minification in Webpack by SWC, in our limited tests, it improved by about 30% our build time in Webpack.
crafty-preset-typescript
works with two steps, one is to convert TypeScript to modern EcmaScript, and a second step that transpiles EcmaScript down to what's supported by the browsers you need to support.
This second step was done by Babel but SWC will now be used instead.
TypeScript 5.0
TypeScript 5.0 was released a few weeks ago. Along with many features which I won't cover here, this version is 10-25% faster and smaller than before.
Along with the update we added a test suite to make sure that new syntax that's introduced by TypeScript can be properly parsed by the whole toolchain it goes through; ESLint, SWC, Prettier and all other pieces in between need to understand a new feature for it to be effectively useable inside Crafty. This also allows us to easily track the features that aren't working at the moment and make sure they'll be available to you when all tools support them.
This helped us finalize support for *.mts
and *.cts
files, you may now decide to use either extension for your module or commonjs files. Of course, the current *.ts
and *.tsx
extensions will continue to work fine.
New crafty-preset-lightningcss
as alternative to crafty-preset-postcss
Lightningcss is a recent contender in the CSS space, built in Rust ... I think you can guess what's coming next; it's very fast.
Previous releases of Crafty have introduced lightningcss as a part of crafty-preset-postcss
and replaced some postcss plugins with it. We decided to take it a step further and provide a preset that completely bypasses postcss plugins.
You will get less features out of the box (as our postcss preset is packed with them) but could find that it's enough for your needs and offers a lighter and faster alternative.
Extract CSS linting into crafty-preset-stylelint
Now that we have two presets that can convert CSS, we extracted CSS Linting into a separate package,.
This preset exposes the crafty cssLint
command and can be used without requiring crafty-preset-lightningcss
nor crafty-preset-postcss
crafty-runner-webpack
's --profile
and --analyze
options
Up until Crafty 1.21.1 running crafty run
with --profile
would export an analysis created with webpack-bundle-analyzer. Starting with Crafty 1.22.0 this option is renamed to --analyze
The --profile
options still remains but instead outputs an analysis of the time spent in loaders and plugins provided by speed-measure-webpack-plugin. This can help track down performance issues in your builds.
Updates
- webpack from 5.75.0 to 5.79.0
- Jest from 29.2.0 to 29.5.0
- lightningcss from 1.18.0 to 1.19.0
- rollup 3.10.0 to 3.20.2
Full Changelog: v1.21.1...v1.22.0
[1.21.1]
Highlights
- React Fast Refresh is now the default mode for Hot Module Replacement
- Added some examples on how to use Crafty : https://github.com/swissquote/crafty/tree/master/examples
- Allow to run WebpackPluginServe more than once in watch mode, is useful if you have multiple bundles in a single configuration
- Update to Typescript 4.9
React Fast Refresh
note that React Fast Refresh works only with the development version of React, if you are loading React through requirejs or equivalent make sure to switch to the dev version while running crafty watch
Libraries Updates
- webpack update to 5.75.0
- postcss update to 8.4.21
- babel update to 7.20.12
- babel-loader update to 9.1.2
- eslint update to 8.31.0
- jest update to 29.3.1
- stylelint update to 14.16.1
- rollup to 3.10.0 (new major) -> updated related plugins as well
- typescript update to 4.9.4
- lightningcss to 1.18.0
Full Changelog: v1.20.0...v1.21.1