cross-import
Advanced tools
Comparing version 2.2.7 to 2.2.8
@@ -1,2 +0,2 @@ | ||
var d=Object.create;var f=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var P=(r,e)=>{for(var t in e)f(r,t,{get:e[t],enumerable:!0})},n=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of g(e))!y.call(r,s)&&s!==t&&f(r,s,{get:()=>e[s],enumerable:!(o=h(e,s))||o.enumerable});return r};var i=(r,e,t)=>(t=r!=null?d(v(r)):{},n(e||!r||!r.__esModule?f(t,"default",{value:r,enumerable:!0}):t,r)),w=r=>n(f({},"__esModule",{value:!0}),r);var x={};P(x,{crossImport:()=>u,default:()=>u});module.exports=w(x);var c=i(require("path")),m=i(require("fast-glob")),a=i(require("@techor/extend")),p=i(require("jiti")),l=require("sucrase");function u(r,e){if(e=(0,a.default)({cwd:process.cwd()},e),!r)return;let t=m.default.sync(r,e)[0];if(!t)return;let o=c.default.resolve(e.cwd,t);process.env.DEBUG&&console.log("[crossImport] resolvedFilePath:",o);try{return delete require.cache[o],require(o)}catch{return(0,p.default)(__filename,{interopDefault:!0,transform:s=>(0,l.transform)(s.source,{transforms:["imports","typescript"]})})(o)}}0&&(module.exports={crossImport}); | ||
var h=Object.create;var c=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var D=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var B=(r,e)=>{for(var o in e)c(r,o,{get:e[o],enumerable:!0})},n=(r,e,o,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of g(e))!v.call(r,s)&&s!==o&&c(r,s,{get:()=>e[s],enumerable:!(t=d(e,s))||t.enumerable});return r};var i=(r,e,o)=>(o=r!=null?h(D(r)):{},n(e||!r||!r.__esModule?c(o,"default",{value:r,enumerable:!0}):o,r)),E=r=>n(c({},"__esModule",{value:!0}),r);var G={};B(G,{crossImport:()=>u,default:()=>u});module.exports=E(G);var f=i(require("path")),l=i(require("fast-glob")),m=i(require("@techor/extend")),p=i(require("jiti")),a=require("sucrase");function u(r,e){if(e=(0,m.default)({cwd:process.cwd()},e),!r)return;let o=l.default.sync(r,e)[0];if(!o)return;let t=f.default.resolve(e.cwd,o);process.env.DEBUG&&console.log("[DEBUG: Cross Import] resolvedFilePath:",t);try{require.cache[t]&&(delete require.cache[t],process.env.DEBUG&&console.log("[DEBUG: Cross Import] delete cache"))}catch{}try{return process.env.DEBUG&&console.log("[DEBUG: Cross Import] require"),require(t)}catch{return process.env.DEBUG&&console.log("[Cross Import] JITI"),(0,p.default)(__filename,{interopDefault:!0,cache:!1,transform:s=>(0,a.transform)(s.source,{transforms:["imports","typescript"]})})(t)}}0&&(module.exports={crossImport}); | ||
//# sourceMappingURL=index.js.map |
@@ -1,1 +0,1 @@ | ||
{"name":"cross-import","scripts":{"build:cjs":"esbuild src/index.ts --bundle --outfile=dist/index.js --format=cjs --minify --sourcemap --platform=node --external:esbuild --external:fast-glob --external:jiti --external:@techor/extend --external:sucrase --external:upath","build:esm":"esbuild src/index.esm.ts --bundle --outfile=dist/index.esm.mjs --format=esm --minify --sourcemap --platform=node --external:esbuild --external:fast-glob --external:jiti --external:@techor/extend --external:sucrase --external:upath","build:type":"tsc --emitDeclarationOnly --preserveWatchOutput","build":"npm run build:cjs && npm run build:esm && npm run build:type","dev":"conc 'npm:build:* -- --watch'","test":"node -r sucrase/register ./tests/real && jest","type-check":"tsc --noEmit","lint":"eslint src"},"license":"MIT","description":"Import .ts, .mjs, .cjs files across environments as JavaScript modules","author":{"name":"Aron","email":"i@aron.tw","url":"http://aron.tw"},"homepage":"https://aron.tw","bugs":{"url":"https://github.com/1aron/utils/issues"},"repository":{"type":"git","url":"https://github.com/1aron/utils.git","directory":"packages/read-module"},"keywords":["cjs","mjs","config","utils","module","read","cross","environments","esm","commonjs","ts","typescript"],"sideEffects":false,"publishConfig":{"access":"public"},"main":"./dist/index.js","jsnext:main":"./dist/index.esm.mjs","esnext":"./dist/index.esm.mjs","module":"./dist/index.esm.mjs","types":"./dist/index.d.ts","exports":{".":{"require":"./dist/index.js","import":"./dist/index.esm.mjs","types":"./dist/index.d.ts"}},"files":["dist"],"dependencies":{"@techor/extend":"^2.2.7","fast-glob":"^3.2.12","jiti":"^1.18.2","sucrase":"^3.32.0","upath":"^2.0.1"},"version":"2.2.7"} | ||
{"name":"cross-import","scripts":{"build:cjs":"esbuild src/index.ts --bundle --outfile=dist/index.js --format=cjs --minify --sourcemap --platform=node --external:esbuild --external:fast-glob --external:jiti --external:@techor/extend --external:sucrase --external:upath","build:type":"tsc --emitDeclarationOnly --preserveWatchOutput","build":"npm run build:cjs && npm run build:type","dev":"conc 'npm:build:* -- --watch'","test":"node -r sucrase/register ./tests/real && jest","type-check":"tsc --noEmit","lint":"eslint src"},"license":"MIT","description":"Import .ts, .mjs, .cjs files across environments as JavaScript modules","author":{"name":"Aron","email":"i@aron.tw","url":"http://aron.tw"},"homepage":"https://aron.tw","bugs":{"url":"https://github.com/1aron/utils/issues"},"repository":{"type":"git","url":"https://github.com/1aron/utils.git","directory":"packages/read-module"},"keywords":["cjs","mjs","config","utils","module","read","cross","environments","commonjs","ts","typescript"],"sideEffects":false,"publishConfig":{"access":"public"},"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"require":"./dist/index.js","import":"./dist/index.js","types":"./dist/index.d.ts"}},"files":["dist"],"dependencies":{"@techor/extend":"^2.2.8","fast-glob":"^3.2.12","jiti":"^1.18.2","sucrase":"^3.32.0","upath":"^2.0.1"},"version":"2.2.8"} |
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
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
5
10826
5
10
1
Updated@techor/extend@^2.2.8