@moneko/core 3.9.5 → 3.9.7

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
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return n}});const e=require("buffer"),t=require("lightningcss"),r={Declaration:{custom:e=>{if("content"===e.name&&1===e.value.length){let t=e.value[0];if("token"===t.type&&"string"===t.value.type)return[{property:e.name,raw:JSON.stringify(t.value.value.replace(/[\u4e00-\u9faF]/g,e=>`\\${e.charCodeAt(0).toString(16)}`))}]}}}};async function n(n,i){let a=this.async(),{implementation:o,targets:s,visitor:u,rem:c,...f}=this.getOptions();if(o&&"function"!=typeof o.transform){this.cacheable(!1),a(TypeError(`[lightningcss]: implementation.transform must be an 'lightningcss' transform function. Received ${typeof o.transform}`));return}let l=o?.transform??t.transform;try{c&&!r.Length&&(r.Length=function(e){if("px"===e.unit)return{unit:"rem",value:e.value/16}});let{code:t,map:o}=l({filename:this.resourcePath,code:e.Buffer.from(n),targets:s,minify:!0,visitor:{...r,...u},sourceMap:this.sourceMap,inputSourceMap:this.sourceMap&&i?JSON.stringify(i):void 0,...f});this.cacheable(!0),a(null,t.toString(),o&&JSON.parse(o.toString()))}catch(e){this.cacheable(!1),a(e)}}
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return n}});const e=require("buffer"),t=require("lightningcss"),r={Declaration:{custom(e){if("content"===e.name&&1===e.value.length){let t=e.value[0];if("token"===t.type&&"string"===t.value.type)return[{property:e.name,raw:JSON.stringify(t.value.value.replace(/[\u4e00-\u9faF]/g,function(e){return`\\${e.charCodeAt(0).toString(16)}`}))}]}}}};async function n(n,i){let a=this.async(),{implementation:o,visitor:s,rem:u,...c}=this.getOptions();if(o&&"function"!=typeof o.transform){this.cacheable(!1),a(TypeError(`[lightningcss]: implementation.transform must be an 'lightningcss' transform function. Received ${typeof o.transform}`));return}let f=o?.transform?o.transform:t.transform;try{u&&!r.Length&&(r.Length=function(e){if("px"===e.unit)return{unit:"rem",value:e.value/16}});let{code:t,map:o}=f({filename:this.resourcePath,code:e.Buffer.from(n),minify:!0,visitor:{...r,...s},sourceMap:!!this.sourceMap,inputSourceMap:this.sourceMap&&i?JSON.stringify(i):void 0,...c});this.cacheable(!0),a(null,t.toString(),o&&JSON.parse(o.toString()))}catch(e){this.cacheable(!1),a(e)}}
@@ -4,4 +4,4 @@ export interface LightningCssLoaderOption extends Omit<TransformOptions<CustomAt
4
4
  rem?: boolean;
5
5
  implementation?: typeof import('lightningcss');
6
6
  }
7
- export default function LightningCssLoader(this: LoaderContext<LightningCssLoaderOption>, source: string, prevMap?: Record<string, unknown>): Promise<void>;
7
+ export default function LightningCssLoader(this: LoaderContext<LightningCssLoaderOption>, source: string, prevMap?: string): Promise<void>;
package/lib/swcrc.js CHANGED
@@ -1 +1 @@
1
- import{merge as e}from"webpack-merge";import{CONFIG as o}from"./config.js";import r from"./paths.js";import s from"./polyfills.js";import{isReact as t,isSolid as n,jsxImportSource as c}from"./process-env.js";export const swcMinifyOption={compress:{top_retain:[],keep_infinity:!0,global_defs:{"@alert":"console.log"},pure_funcs:["console.log","console.warn","console.error","console.info"],toplevel:!1,drop_console:!0,drop_debugger:!0,module:!1,ecma:2015,ie8:!1,keep_classnames:void 0,keep_fnames:!1},mangle:!0};export default((l=!1)=>{let p={module:{type:"es6",resolveFully:!0},jsc:{parser:{syntax:"typescript",tsx:!0,decorators:!0,dynamicImport:!0},loose:!0,target:"es2017",externalHelpers:!0,transform:{legacyDecorator:!0,decoratorMetadata:!0,react:{runtime:"automatic",throwIfNamespace:!0,refresh:t&&l,development:l,importSource:c},optimizer:{simplify:!1}},experimental:{emitAssertForImportAttributes:!0,cacheRoot:r.swcCachePath,plugins:[["swc-plugin-another-transform-imports",function(e){for(let o=0,r=Object.keys(e),s=r.length;o<s;o++)e[r[o]].transform=`${r[o]}/${e[r[o]].transform}`,e[r[o]].style&&(e[r[o]].style=`${r[o]}/${e[r[o]].style}`);return e}(o.importOnDemand||{})],n&&["@moneko/jsx-dom-expressions",o.jsxDomExpressions||{}],l&&["remove-console",{exclude:["error"]}]].filter(Boolean)}},sourceMaps:!0,parseMap:!0};return(o.polyfill&&(p.jsc.target=void 0,p.env={include:s(),mode:"entry",coreJs:"3.34"}),o.swcrc)?e(p,"function"==typeof o.swcrc?o.swcrc(l):o.swcrc):p});
1
+ import{merge as e}from"webpack-merge";import{CONFIG as o}from"./config.js";import r from"./paths.js";import s from"./polyfills.js";import{isReact as t,isSolid as n,jsxImportSource as c}from"./process-env.js";export const swcMinifyOption={compress:{top_retain:[],keep_infinity:!0,global_defs:{"@alert":"console.log"},pure_funcs:["console.log","console.warn","console.error","console.info"],toplevel:!1,drop_console:!0,drop_debugger:!0,module:!1,ecma:2015,ie8:!1,keep_classnames:void 0,keep_fnames:!1},mangle:!0};export default((l=!1)=>{let p={module:{type:"es6",resolveFully:!0},jsc:{parser:{syntax:"typescript",tsx:!0,decorators:!0,dynamicImport:!0},loose:!0,target:"es2017",externalHelpers:!0,transform:{legacyDecorator:!0,decoratorMetadata:!0,react:{runtime:"automatic",throwIfNamespace:!0,refresh:t&&l,development:l,importSource:c},optimizer:{simplify:!1}},experimental:{emitAssertForImportAttributes:!0,cacheRoot:r.swcCachePath,plugins:[["swc-plugin-another-transform-imports",function(e){for(let o=0,r=Object.keys(e),s=r.length;o<s;o++)e[r[o]].transform=`${r[o]}/${e[r[o]].transform}`,e[r[o]].style&&(e[r[o]].style=`${r[o]}/${e[r[o]].style}`);return e}(o.importOnDemand||{})],n&&["@moneko/jsx-dom-expressions",o.jsxDomExpressions||{}]].filter(Boolean)}},sourceMaps:!0,parseMap:!0};return(o.polyfill&&(p.jsc.target=void 0,p.env={include:s(),mode:"entry",coreJs:"3.34"}),o.swcrc)?e(p,"function"==typeof o.swcrc?o.swcrc(l):o.swcrc):p});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/core",
3
- "version": "3.9.5",
3
+ "version": "3.9.7",
4
4
  "description": "core",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",