@powerlines/plugin-react 0.1.32 → 0.1.34
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/dist/index.cjs +3 -3
- package/dist/index.js +3 -3
- package/package.json +8 -8
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkFBBMZ4NC_cjs=require('./chunk-FBBMZ4NC.cjs'),jsxRuntime=require('@alloy-js/core/jsx-runtime'),createPlugin=require('@powerlines/alloy/create-plugin'),type=require('@powerlines/deepkit/vendor/type'),
|
|
1
|
+
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkFBBMZ4NC_cjs=require('./chunk-FBBMZ4NC.cjs'),jsxRuntime=require('@alloy-js/core/jsx-runtime'),createPlugin=require('@powerlines/alloy/create-plugin'),type=require('@powerlines/deepkit/vendor/type'),f=require('@powerlines/plugin-babel'),a=require('@powerlines/plugin-env'),types$1=require('@storm-software/config-tools/types'),g=require('@vitejs/plugin-react'),d=require('defu'),tsconfig=require('powerlines/lib/typescript/tsconfig'),reactOptimized=require('./components/react-optimized'),components=require('./components'),types=require('./types');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var f__default=/*#__PURE__*/_interopDefault(f);var a__default=/*#__PURE__*/_interopDefault(a);var g__default=/*#__PURE__*/_interopDefault(g);var d__default=/*#__PURE__*/_interopDefault(d);/*****************************************
|
|
2
2
|
*
|
|
3
3
|
* ⚡ Built by Storm Software
|
|
4
4
|
*
|
|
5
5
|
*****************************************/
|
|
6
6
|
|
|
7
|
-
const h=createPlugin.createAlloyPlugin(s=>({name:"react",dependsOn:[
|
|
8
|
-
${i.detail.description}`:""}`:i.kind==="Timing"?`React ${i.measurement.entryType} Timing (${i.measurement.name}) - ${i.measurement.duration}ms`:`React Compiler Error - ${i.fnLoc?.identifierName||"unknown location"}`}`);},"logEvent")}}}})},configResolved(){if(this.dependencies.react="^19.2.0",this.dependencies["react-dom"]="^19.2.0",this.devDependencies["@types/react"]="^19.2.2",this.devDependencies["@types/react-dom"]="^19.2.2",this.config.react.compiler!==false&&(this.config.transform.babel??={},this.config.transform.babel.plugins??=[],this.config.transform.babel.plugins.push(["babel-plugin-react-compiler",this.config.react.compiler])),this.tsconfig.tsconfigJson.compilerOptions??={},this.tsconfig.tsconfigJson.compilerOptions.module??="esnext",this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource=this.config.react.jsxImportSource,this.tsconfig.
|
|
7
|
+
const h=createPlugin.createAlloyPlugin(s=>({name:"react",dependsOn:[f__default.default(s.babel),a__default.default(s.env)],config(){return d__default.default({react:s},{react:{jsxImportSource:this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource}},{react:{jsxRuntime:"automatic",jsxImportSource:"react",compiler:{target:"19",compilationMode:"infer",gating:{source:`${this.config.output.builtinPrefix}:react/optimized`,importSpecifierName:"isOptimizationEnabled"},enableReanimatedCheck:true,logger:{logEvent:chunkFBBMZ4NC_cjs.a((o,i)=>{this.log(i.kind==="CompileSuccess"?types$1.LogLevelLabel.SUCCESS:i.kind==="AutoDepsEligible"||i.kind==="AutoDepsDecorations"?types$1.LogLevelLabel.INFO:i.kind==="CompileSkip"||i.kind==="CompileDiagnostic"?types$1.LogLevelLabel.DEBUG:i.kind==="Timing"?types$1.LogLevelLabel.TRACE:types$1.LogLevelLabel.ERROR,`(${o}) ${i.kind==="CompileSuccess"?"React Compiler Success":i.kind==="AutoDepsEligible"?`React AutoDeps Eligible - ${i.depArrayLoc.identifierName||"No identifier"}`:i.kind==="AutoDepsDecorations"?`React AutoDeps Decorations - ${i.decorations.filter(n=>n.identifierName).map(n=>n.identifierName).join(", ")}`:i.kind==="CompileSkip"?`React Compile Skip - ${i.reason}`:i.kind==="CompileDiagnostic"?`React Compile Diagnostic - (Category: ${i.detail.category}) ${i.detail.reason}${i.detail.description?`
|
|
8
|
+
${i.detail.description}`:""}`:i.kind==="Timing"?`React ${i.measurement.entryType} Timing (${i.measurement.name}) - ${i.measurement.duration}ms`:`React Compiler Error - ${i.fnLoc?.identifierName||"unknown location"}`}`);},"logEvent")}}}})},configResolved(){if(this.dependencies.react="^19.2.0",this.dependencies["react-dom"]="^19.2.0",this.devDependencies["@types/react"]="^19.2.2",this.devDependencies["@types/react-dom"]="^19.2.2",this.config.react.compiler!==false&&(this.config.transform.babel??={},this.config.transform.babel.plugins??=[],this.config.transform.babel.plugins.push(["babel-plugin-react-compiler",this.config.react.compiler])),this.tsconfig.tsconfigJson.compilerOptions??={},this.tsconfig.tsconfigJson.compilerOptions.module??="esnext",this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource=this.config.react.jsxImportSource,this.tsconfig.options.jsxImportSource==="react"?this.tsconfig.tsconfigJson.compilerOptions.jsx??="react-jsx":this.tsconfig.tsconfigJson.compilerOptions.jsx??="preserve",this.environment.consumer==="client"&&(this.tsconfig.options.lib?.some(o=>o.toLowerCase()!=="dom")||(this.tsconfig.tsconfigJson.compilerOptions.lib??=[],this.tsconfig.tsconfigJson.compilerOptions.lib.push("dom")),this.tsconfig.options.lib?.some(o=>o.toLowerCase()!=="dom.iterable")||(this.tsconfig.tsconfigJson.compilerOptions.lib??=[],this.tsconfig.tsconfigJson.compilerOptions.lib.push("dom.iterable"))),this.tsconfig.tsconfigJson.compilerOptions.lib=[],tsconfig.isMatchFound("dom",this.tsconfig.tsconfigJson.compilerOptions.lib)||this.tsconfig.tsconfigJson.compilerOptions.lib.push("DOM"),tsconfig.isMatchFound("dom.iterable",this.tsconfig.tsconfigJson.compilerOptions.lib)||this.tsconfig.tsconfigJson.compilerOptions.lib.push("DOM.Iterable"),tsconfig.isMatchFound("esnext",this.tsconfig.tsconfigJson.compilerOptions.lib)||this.tsconfig.tsconfigJson.compilerOptions.lib.push("ESNext"),this.tsconfig.options.resolveJsonModule!==true&&(this.tsconfig.tsconfigJson.compilerOptions.resolveJsonModule=true),this.config.build.variant==="vite"){this.tsconfig.tsconfigJson.compilerOptions.types??=[],tsconfig.isMatchFound("vite/client",this.tsconfig.tsconfigJson.compilerOptions.types)||this.tsconfig.tsconfigJson.compilerOptions.types.push("vite/client");const o=this.config.build;o.build??={},o.build.target="chrome95",o.plugins??=[],o.plugins.unshift(g__default.default({babel:this.config.transform.babel,jsxImportSource:this.config.react.jsxImportSource,jsxRuntime:this.config.react.jsxRuntime,reactRefreshHost:this.config.react.reactRefreshHost}));}this.env?.types?.env&&!this.env.types.env.hasProperty("DISABLE_REACT_COMPILER")&&this.env.types.env.addProperty({name:"DISABLE_REACT_COMPILER",optional:true,readonly:true,description:"Disables the React compiler optimizations.",visibility:type.ReflectionVisibility.public,type:{kind:type.ReflectionKind.boolean},default:false});},render(){const o=this;return jsxRuntime.createComponent(reactOptimized.ReactOptimizedBuiltin,{get override(){return o.config.react.compiler===false?false:void 0}})}}));var j=h;exports.default=j;exports.plugin=h;Object.keys(components).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return components[k]}})});Object.keys(types).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return types[k]}})});
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-UCUR73HG.js';import {createComponent}from'@alloy-js/core/jsx-runtime';import {createAlloyPlugin}from'@powerlines/alloy/create-plugin';import {ReflectionKind,ReflectionVisibility}from'@powerlines/deepkit/vendor/type';import
|
|
1
|
+
import {a as a$1}from'./chunk-UCUR73HG.js';import {createComponent}from'@alloy-js/core/jsx-runtime';import {createAlloyPlugin}from'@powerlines/alloy/create-plugin';import {ReflectionKind,ReflectionVisibility}from'@powerlines/deepkit/vendor/type';import f from'@powerlines/plugin-babel';import a from'@powerlines/plugin-env';import {LogLevelLabel}from'@storm-software/config-tools/types';import g from'@vitejs/plugin-react';import d from'defu';import {isMatchFound}from'powerlines/lib/typescript/tsconfig';import {ReactOptimizedBuiltin}from'./components/react-optimized';export*from'./components';export*from'./types';/*****************************************
|
|
2
2
|
*
|
|
3
3
|
* ⚡ Built by Storm Software
|
|
4
4
|
*
|
|
5
5
|
*****************************************/
|
|
6
6
|
|
|
7
|
-
const h=createAlloyPlugin(s=>({name:"react",dependsOn:[
|
|
8
|
-
${i.detail.description}`:""}`:i.kind==="Timing"?`React ${i.measurement.entryType} Timing (${i.measurement.name}) - ${i.measurement.duration}ms`:`React Compiler Error - ${i.fnLoc?.identifierName||"unknown location"}`}`);},"logEvent")}}}})},configResolved(){if(this.dependencies.react="^19.2.0",this.dependencies["react-dom"]="^19.2.0",this.devDependencies["@types/react"]="^19.2.2",this.devDependencies["@types/react-dom"]="^19.2.2",this.config.react.compiler!==false&&(this.config.transform.babel??={},this.config.transform.babel.plugins??=[],this.config.transform.babel.plugins.push(["babel-plugin-react-compiler",this.config.react.compiler])),this.tsconfig.tsconfigJson.compilerOptions??={},this.tsconfig.tsconfigJson.compilerOptions.module??="esnext",this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource=this.config.react.jsxImportSource,this.tsconfig.
|
|
7
|
+
const h=createAlloyPlugin(s=>({name:"react",dependsOn:[f(s.babel),a(s.env)],config(){return d({react:s},{react:{jsxImportSource:this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource}},{react:{jsxRuntime:"automatic",jsxImportSource:"react",compiler:{target:"19",compilationMode:"infer",gating:{source:`${this.config.output.builtinPrefix}:react/optimized`,importSpecifierName:"isOptimizationEnabled"},enableReanimatedCheck:true,logger:{logEvent:a$1((o,i)=>{this.log(i.kind==="CompileSuccess"?LogLevelLabel.SUCCESS:i.kind==="AutoDepsEligible"||i.kind==="AutoDepsDecorations"?LogLevelLabel.INFO:i.kind==="CompileSkip"||i.kind==="CompileDiagnostic"?LogLevelLabel.DEBUG:i.kind==="Timing"?LogLevelLabel.TRACE:LogLevelLabel.ERROR,`(${o}) ${i.kind==="CompileSuccess"?"React Compiler Success":i.kind==="AutoDepsEligible"?`React AutoDeps Eligible - ${i.depArrayLoc.identifierName||"No identifier"}`:i.kind==="AutoDepsDecorations"?`React AutoDeps Decorations - ${i.decorations.filter(n=>n.identifierName).map(n=>n.identifierName).join(", ")}`:i.kind==="CompileSkip"?`React Compile Skip - ${i.reason}`:i.kind==="CompileDiagnostic"?`React Compile Diagnostic - (Category: ${i.detail.category}) ${i.detail.reason}${i.detail.description?`
|
|
8
|
+
${i.detail.description}`:""}`:i.kind==="Timing"?`React ${i.measurement.entryType} Timing (${i.measurement.name}) - ${i.measurement.duration}ms`:`React Compiler Error - ${i.fnLoc?.identifierName||"unknown location"}`}`);},"logEvent")}}}})},configResolved(){if(this.dependencies.react="^19.2.0",this.dependencies["react-dom"]="^19.2.0",this.devDependencies["@types/react"]="^19.2.2",this.devDependencies["@types/react-dom"]="^19.2.2",this.config.react.compiler!==false&&(this.config.transform.babel??={},this.config.transform.babel.plugins??=[],this.config.transform.babel.plugins.push(["babel-plugin-react-compiler",this.config.react.compiler])),this.tsconfig.tsconfigJson.compilerOptions??={},this.tsconfig.tsconfigJson.compilerOptions.module??="esnext",this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource=this.config.react.jsxImportSource,this.tsconfig.options.jsxImportSource==="react"?this.tsconfig.tsconfigJson.compilerOptions.jsx??="react-jsx":this.tsconfig.tsconfigJson.compilerOptions.jsx??="preserve",this.environment.consumer==="client"&&(this.tsconfig.options.lib?.some(o=>o.toLowerCase()!=="dom")||(this.tsconfig.tsconfigJson.compilerOptions.lib??=[],this.tsconfig.tsconfigJson.compilerOptions.lib.push("dom")),this.tsconfig.options.lib?.some(o=>o.toLowerCase()!=="dom.iterable")||(this.tsconfig.tsconfigJson.compilerOptions.lib??=[],this.tsconfig.tsconfigJson.compilerOptions.lib.push("dom.iterable"))),this.tsconfig.tsconfigJson.compilerOptions.lib=[],isMatchFound("dom",this.tsconfig.tsconfigJson.compilerOptions.lib)||this.tsconfig.tsconfigJson.compilerOptions.lib.push("DOM"),isMatchFound("dom.iterable",this.tsconfig.tsconfigJson.compilerOptions.lib)||this.tsconfig.tsconfigJson.compilerOptions.lib.push("DOM.Iterable"),isMatchFound("esnext",this.tsconfig.tsconfigJson.compilerOptions.lib)||this.tsconfig.tsconfigJson.compilerOptions.lib.push("ESNext"),this.tsconfig.options.resolveJsonModule!==true&&(this.tsconfig.tsconfigJson.compilerOptions.resolveJsonModule=true),this.config.build.variant==="vite"){this.tsconfig.tsconfigJson.compilerOptions.types??=[],isMatchFound("vite/client",this.tsconfig.tsconfigJson.compilerOptions.types)||this.tsconfig.tsconfigJson.compilerOptions.types.push("vite/client");const o=this.config.build;o.build??={},o.build.target="chrome95",o.plugins??=[],o.plugins.unshift(g({babel:this.config.transform.babel,jsxImportSource:this.config.react.jsxImportSource,jsxRuntime:this.config.react.jsxRuntime,reactRefreshHost:this.config.react.reactRefreshHost}));}this.env?.types?.env&&!this.env.types.env.hasProperty("DISABLE_REACT_COMPILER")&&this.env.types.env.addProperty({name:"DISABLE_REACT_COMPILER",optional:true,readonly:true,description:"Disables the React compiler optimizations.",visibility:ReflectionVisibility.public,type:{kind:ReflectionKind.boolean},default:false});},render(){const o=this;return createComponent(ReactOptimizedBuiltin,{get override(){return o.config.react.compiler===false?false:void 0}})}}));var I=h;export{I as default,h as plugin};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.34",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin for building a React application.",
|
|
6
6
|
"repository": {
|
|
@@ -130,19 +130,19 @@
|
|
|
130
130
|
"@stryke/fs": "^0.33.3",
|
|
131
131
|
"@stryke/path": "^0.21.1",
|
|
132
132
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
133
|
-
"@powerlines/alloy": "^0.11.
|
|
134
|
-
"@powerlines/plugin-babel": "^0.12.
|
|
135
|
-
"@powerlines/plugin-env": "^0.13.
|
|
136
|
-
"@powerlines/plugin-plugin": "^0.11.
|
|
133
|
+
"@powerlines/alloy": "^0.11.43",
|
|
134
|
+
"@powerlines/plugin-babel": "^0.12.43",
|
|
135
|
+
"@powerlines/plugin-env": "^0.13.40",
|
|
136
|
+
"@powerlines/plugin-plugin": "^0.11.42",
|
|
137
137
|
"@vitejs/plugin-react": "^5.1.1",
|
|
138
138
|
"defu": "^6.1.4",
|
|
139
|
-
"powerlines": "^0.24.
|
|
139
|
+
"powerlines": "^0.24.6"
|
|
140
140
|
},
|
|
141
141
|
"devDependencies": {
|
|
142
|
-
"@powerlines/nx": "^0.10.
|
|
142
|
+
"@powerlines/nx": "^0.10.34",
|
|
143
143
|
"@storm-software/tsup": "^0.2.46",
|
|
144
144
|
"@types/node": "^24.10.1"
|
|
145
145
|
},
|
|
146
146
|
"publishConfig": { "access": "public" },
|
|
147
|
-
"gitHead": "
|
|
147
|
+
"gitHead": "ad58c18aacf7f32ece53a66e111dd145bbfbcf05"
|
|
148
148
|
}
|