@sanity/tsdown-config 0.28.0 → 0.28.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cssLoweringTargets-Dn_sJGip.mjs","names":[],"sources":["../src/cssLoweringTargets.ts"],"sourcesContent":["import {esbuildTargetToLightningCSS} from '@sanity/vanilla-extract-tsdown-plugin'\nimport type {Targets} from 'lightningcss'\n\n/** The `lightningcss` options both CSS pipelines accept, narrowed to what this helper touches. */\ninterface LightningCSSOptionsWithTargets {\n targets?: Targets | undefined\n}\n\n/**\n * Resolves the CSS syntax lowering targets for a CSS pipeline\n * (`vanillaExtract`/`css`), applying the Sanity-flavored fallback on top of the\n * `@tsdown/css` behavior both pipelines otherwise follow.\n *\n * `@tsdown/css` skips syntax lowering when it has no browser targets. Extracted CSS always runs\n * in browsers though, so when the effective target (the pipeline's own `target`, falling back to\n * the top-level `target`) is undefined or names no browsers - e.g. `'node20'`, which is also\n * what tsdown derives from `engines.node` and speaks to the JS runtime - the lowering targets\n * are resolved from `@sanity/browserslist-config` and passed through `lightningcss.targets`\n * instead.\n *\n * `target: false` stays the explicit off switch, and a user-provided `lightningcss.targets`\n * wins over the fallback.\n *\n * @internal\n */\nexport async function resolveCssLoweringTargets
|
|
1
|
+
{"version":3,"file":"cssLoweringTargets-Dn_sJGip.mjs","names":[],"sources":["../src/cssLoweringTargets.ts"],"sourcesContent":["import {esbuildTargetToLightningCSS} from '@sanity/vanilla-extract-tsdown-plugin'\nimport type {Targets} from 'lightningcss'\n\n/** The `lightningcss` options both CSS pipelines accept, narrowed to what this helper touches. */\ninterface LightningCSSOptionsWithTargets {\n targets?: Targets | undefined\n}\n\n/**\n * Resolves the CSS syntax lowering targets for a CSS pipeline\n * (`vanillaExtract`/`css`), applying the Sanity-flavored fallback on top of the\n * `@tsdown/css` behavior both pipelines otherwise follow.\n *\n * `@tsdown/css` skips syntax lowering when it has no browser targets. Extracted CSS always runs\n * in browsers though, so when the effective target (the pipeline's own `target`, falling back to\n * the top-level `target`) is undefined or names no browsers - e.g. `'node20'`, which is also\n * what tsdown derives from `engines.node` and speaks to the JS runtime - the lowering targets\n * are resolved from `@sanity/browserslist-config` and passed through `lightningcss.targets`\n * instead.\n *\n * `target: false` stays the explicit off switch, and a user-provided `lightningcss.targets`\n * wins over the fallback.\n *\n * @internal\n */\nexport async function resolveCssLoweringTargets(options: {\n /** The pipeline's own `target` option. */\n cssTarget: string | string[] | false | undefined\n /** tsdown's top-level `target`, the fallback for `cssTarget`. */\n target: string | string[] | false | undefined\n /** The pipeline's own `lightningcss` options. */\n lightningcss: LightningCSSOptionsWithTargets | undefined\n}): Promise<LightningCSSOptionsWithTargets | undefined> {\n const {target, lightningcss} = options\n const cssTarget = options.cssTarget ?? target\n\n if (\n cssTarget === false ||\n lightningcss?.targets ||\n (cssTarget !== undefined && esbuildTargetToLightningCSS(cssTarget))\n ) {\n return lightningcss\n }\n\n // Lazy loaded: `browserslistToTargets` is a pure helper, but `lightningcss` is a native\n // package that only needs to load when the fallback applies\n const [{default: browserslist}, {default: browserslistConfig}, {browserslistToTargets}] =\n await Promise.all([\n import('browserslist'),\n import('@sanity/browserslist-config'),\n import('lightningcss'),\n ])\n return {\n ...lightningcss,\n targets: browserslistToTargets(browserslist(browserslistConfig)),\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAyBA,eAAsB,0BAA0B,SAOQ;CACtD,IAAM,EAAC,QAAQ,iBAAgB,SACzB,YAAY,QAAQ,aAAa;CAEvC,IACE,cAAc,MACd,cAAc,WACb,cAAc,KAAA,KAAa,4BAA4B,SAAS,GAEjE,OAAO;CAKT,IAAM,CAAC,EAAC,SAAS,gBAAe,EAAC,SAAS,sBAAqB,EAAC,2BAC9D,MAAM,QAAQ,IAAI;EAChB,OAAO;EACP,OAAO;EACP,OAAO;CACT,CAAC;CACH,OAAO;EACL,GAAG;EACH,SAAS,sBAAsB,aAAa,kBAAkB,CAAC;CACjE;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/tsdown-config",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.1",
|
|
4
4
|
"description": "Shared configuration for tsdown",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity-io",
|
|
@@ -36,32 +36,32 @@
|
|
|
36
36
|
"dist"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@microsoft/api-extractor": "^7.59.
|
|
40
|
-
"@microsoft/tsdoc-config": "^0.18.
|
|
39
|
+
"@microsoft/api-extractor": "^7.59.1",
|
|
40
|
+
"@microsoft/tsdoc-config": "^0.18.2",
|
|
41
41
|
"@sanity/browserslist-config": "^1.0.5",
|
|
42
|
-
"@sanity/vanilla-extract-tsdown-plugin": "^0.4.
|
|
42
|
+
"@sanity/vanilla-extract-tsdown-plugin": "^0.4.1",
|
|
43
43
|
"@typescript/typescript6": "^6.0.2",
|
|
44
44
|
"@vitejs/plugin-react": "^6.1.1",
|
|
45
|
-
"browserslist": "^4.
|
|
45
|
+
"browserslist": "^4.29.0",
|
|
46
46
|
"jsonc-parser": "^3.3.1",
|
|
47
47
|
"lightningcss": "^1.33.0",
|
|
48
48
|
"package-manager-detector": "^1.8.0",
|
|
49
49
|
"publint": "^0.3.24",
|
|
50
|
-
"rolldown": "~1.2.
|
|
50
|
+
"rolldown": "~1.2.9"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@babel/core": "^7.29.7",
|
|
54
|
-
"@rolldown/plugin-babel": "^0.2.
|
|
55
|
-
"@sanity/pkg-utils": "^13.0.
|
|
54
|
+
"@rolldown/plugin-babel": "^0.2.4",
|
|
55
|
+
"@sanity/pkg-utils": "^13.0.1",
|
|
56
56
|
"@sanity/tsconfig": "^2.2.1",
|
|
57
57
|
"@tsdown/css": "^0.23.0",
|
|
58
58
|
"@types/babel__core": "^7.20.5",
|
|
59
59
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
60
|
-
"oxc-transform-react": "^0.
|
|
61
|
-
"tinyexec": "^1.3.
|
|
60
|
+
"oxc-transform-react": "^0.150.0",
|
|
61
|
+
"tinyexec": "^1.3.1",
|
|
62
62
|
"tsdown": "^0.23.0",
|
|
63
63
|
"typescript": "7.0.2",
|
|
64
|
-
"vitest": "^
|
|
64
|
+
"vitest": "^5.0.1"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"@babel/core": "*",
|