You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The interface for the compiler wrapped the util module into an exported namespace.
I'm sure there was a reason to do this, but given the semver semantics breaking changes should increment the middle version number.
Is it bad practices to have the middle number go above 9? If not, then we should consider upgrading to 0.10.0.
For those who might stumble upon this here is how I fixed my custom transformer's dependency on the compiler.
//@ts-ignoreconstpath=require("path");//@ts-ignoreletassemblyscriptPath=Object.getOwnPropertyNames(require.cache).filter(s=>s.endsWith("assemblyscript.js"))[0];lettransformerPath;if(assemblyscriptPath){letsplitPath=assemblyscriptPath.split(path.sep).slice(0,-2);transformerPath=splitPath.concat(["cli","transform"]).join(path.sep);}else{assemblyscriptPath=require.resolve("assemblyscript");transformerPath=require.resolve("assemblyscript/cli/transform");}constassemblyscript=require(assemblyscriptPath);//@ts-ignoremodule.exports.Transform=require(transformerPath).Transform;module.exports={
...module.exports,
...assemblyscript,// Need to add because newer version adds namespace
...assemblyscript.util};
The interface for the compiler wrapped the util module into an exported namespace.
I'm sure there was a reason to do this, but given the semver semantics breaking changes should increment the middle version number.
Is it bad practices to have the middle number go above 9? If not, then we should consider upgrading to 0.10.0.
For those who might stumble upon this here is how I fixed my custom transformer's dependency on the compiler.
then an accompanying .d.t.s file:
The text was updated successfully, but these errors were encountered: