ts-invariant
Advanced tools
Comparing version 0.10.2 to 0.10.3
{ | ||
"name": "ts-invariant", | ||
"version": "0.10.2", | ||
"version": "0.10.3", | ||
"author": "Ben Newman <ben@apollographql.com>", | ||
@@ -46,3 +46,3 @@ "description": "TypeScript implementation of invariant(condition, message)", | ||
}, | ||
"gitHead": "384e0631f2cbc282cafc240df67a0c7d190f58cd" | ||
"gitHead": "c8a2d6d2e839e9bdc595ae5fd2a50331b2b01014" | ||
} |
@@ -8,5 +8,6 @@ { | ||
"sideEffects": [ | ||
"./main.js", | ||
"./main.cjs", | ||
"./main.cjs.native.js", | ||
"./index.js" | ||
] | ||
} |
@@ -0,1 +1,3 @@ | ||
import { promises as fs } from "fs"; | ||
const globals = { | ||
@@ -13,2 +15,15 @@ __proto__: null, | ||
function copyPlugin() { | ||
return { | ||
name: "copy *.cjs to *.cjs.native.js", | ||
async writeBundle({ file }) { | ||
const buffer = await fs.readFile(file); | ||
await fs.writeFile( | ||
file + ".native.js", | ||
buffer, | ||
); | ||
}, | ||
}; | ||
} | ||
const jobs = []; | ||
@@ -28,2 +43,5 @@ export default jobs; | ||
}, | ||
plugins: [ | ||
copyPlugin(), | ||
], | ||
}); | ||
@@ -55,2 +73,5 @@ | ||
}, | ||
plugins: [ | ||
copyPlugin(), | ||
], | ||
}); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28542
18
424
1