@moneko/core 4.10.0-beta.0 → 4.10.0-beta.2

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
- import{merge as e}from"webpack-merge";import r from"../commom/paths.mjs";import{swcImportOnDemandConfig as o}from"../commom/transfer-import-on-demand.mjs";import{CONFIG as t}from"../config.mjs";import m,{coreJsVersion as s}from"../polyfills/polyfills.mjs";import{isDev as p,isReact as a,jsxImportSource as i}from"../process-env.mjs";import c from"./reslove.mjs";let l={include:m(),mode:"entry",coreJs:s};export default((m,s={})=>e({module:{type:"es6",resolveFully:!0},sync:!0,jsc:{parser:{syntax:"typescript",tsx:a,decorators:!0,dynamicImport:!0},loose:!0,target:t.polyfill?void 0:"es2017",externalHelpers:!1,keepClassNames:!0,transform:{legacyDecorator:!0,decoratorMetadata:!0,react:{runtime:t.reactJsxRuntime||"automatic",throwIfNamespace:!0,refresh:a&&p,development:p,importSource:i},reactCompiler:t.reactCompiler,optimizer:{simplify:!1}},experimental:{emitAssertForImportAttributes:!0,cacheRoot:r.swcCachePath,plugins:[!!(t.importOnDemand&&Object.keys(t.importOnDemand).length)&&[c.transformImports,o(t.importOnDemand)]].filter(Boolean)}},env:t.polyfill?l:void 0,sourceMaps:!0,parseMap:!0},"function"==typeof t.swcrc?t.swcrc(p):t.swcrc||{},s));
1
+ import{merge as e}from"webpack-merge";import r from"../commom/paths.mjs";import{swcImportOnDemandConfig as o}from"../commom/transfer-import-on-demand.mjs";import{CONFIG as t}from"../config.mjs";import m,{coreJsVersion as s}from"../polyfills/polyfills.mjs";import{isDev as p,isReact as a,jsxImportSource as i}from"../process-env.mjs";import c from"./reslove.mjs";let l={include:m(),mode:"entry",coreJs:s};export default((m,s={})=>e({module:{type:"es6",resolveFully:!0},sync:!0,jsc:{parser:{syntax:"typescript",tsx:a,decorators:!0,dynamicImport:!0},loose:!0,target:t.polyfill?void 0:"es2017",externalHelpers:!1,keepClassNames:!0,transform:{legacyDecorator:!0,decoratorMetadata:!0,react:{runtime:t.reactJsxRuntime||"automatic",throwIfNamespace:!0,refresh:a&&p,development:p,importSource:i},reactCompiler:{panicThreshold:p?void 0:"NONE",...t.reactCompiler||{}},optimizer:{simplify:!1}},experimental:{emitAssertForImportAttributes:!0,cacheRoot:r.swcCachePath,plugins:[!!(t.importOnDemand&&Object.keys(t.importOnDemand).length)&&[c.transformImports,o(t.importOnDemand)]].filter(Boolean)}},env:t.polyfill?l:void 0,sourceMaps:!0,parseMap:!0},"function"==typeof t.swcrc?t.swcrc(p):t.swcrc||{},s));
@@ -1 +1,22 @@
1
+ // import { parentPort } from 'node:worker_threads';
2
+ // import type { TransformOptions } from '@moneko/eslint/babel-core';
3
+ // import { type PluginOptions, runBabelPluginReactCompiler } from '@moneko/eslint/react-compiler';
4
+ // interface ReactCompilerWorkerOption {
5
+ // sourceCode: string;
6
+ // filename: string;
7
+ // options: Partial<PluginOptions> | null;
8
+ // inputSourceMap?: TransformOptions['inputSourceMap'];
9
+ // }
10
+ // parentPort?.setMaxListeners(0);
11
+ // parentPort?.on(
12
+ // 'message',
13
+ // ({ sourceCode, filename, inputSourceMap, options }: ReactCompilerWorkerOption) => {
14
+ // try {
15
+ // const result = runBabelPluginReactCompiler(sourceCode, filename, 'typescript', options);
16
+ // parentPort?.postMessage([filename, null, result?.code ?? sourceCode, result.map]);
17
+ // } catch (err) {
18
+ // parentPort?.postMessage([filename, err, sourceCode, inputSourceMap]);
19
+ // }
20
+ // },
21
+ // );
1
22
  export { };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/core",
3
- "version": "4.10.0-beta.0",
3
+ "version": "4.10.0-beta.2",
4
4
  "description": "@moneko/core",
5
5
  "main": "lib/index.mjs",
6
6
  "type": "module",
@@ -148,7 +148,7 @@
148
148
  "less-loader": "12.3.3",
149
149
  "lightningcss": "1.33.0",
150
150
  "swc-loader": "0.2.7",
151
- "typescript": "7.0.2",
151
+ "typescript": "6.0.3",
152
152
  "webpack": "5.109.0",
153
153
  "webpack-hot-middleware": "2.26.1",
154
154
  "webpack-merge": "6.0.1"
@@ -1 +0,0 @@
1
- import{parentPort as e}from"node:worker_threads";import{runBabelPluginReactCompiler as r}from"@moneko/eslint/react-compiler";e?.setMaxListeners(0),e?.on("message",({sourceCode:s,filename:t,inputSourceMap:o,options:a})=>{try{let o=r(s,t,"typescript",a);e?.postMessage([t,null,o?.code??s,o.map])}catch(r){e?.postMessage([t,r,s,o])}});