cross-import
Advanced tools
Comparing version 2.0.4 to 2.0.5
import fg from 'fast-glob'; | ||
import { BuildOptions } from 'esbuild'; | ||
export default function crossImport(source: string | fg.Pattern[], options?: fg.Options, buildOptions?: BuildOptions): any; | ||
export default function crossImport(source: string | fg.Pattern[], options?: fg.Options, buildOptions?: any): any; | ||
export { crossImport }; |
@@ -1,2 +0,2 @@ | ||
var w=Object.create;var i=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var F=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var D=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0})},a=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of v(t))!P.call(e,s)&&s!==r&&i(e,s,{get:()=>t[s],enumerable:!(o=k(t,s))||o.enumerable});return e};var c=(e,t,r)=>(r=e!=null?w(F(e)):{},a(t||!e||!e.__esModule?i(r,"default",{value:e,enumerable:!0}):r,e)),E=e=>a(i({},"__esModule",{value:!0}),e);var N={};D(N,{crossImport:()=>x,default:()=>x});module.exports=E(N);var d=c(require("upath")),g=c(require("require-from-string")),b=c(require("fast-glob")),p=c(require("@techor/extend")),h=require("esbuild"),O=require("@techor/fs");function x(e,t,r){if(t=(0,p.default)({cwd:process.cwd()},t),!e)return;let o=b.default.sync(e,t)[0];if(!o)return;let s=(0,O.readFileAsJSON)("./package.json",{cwd:t.cwd}),{dependencies:u,peerDependencies:l,devDependencies:f}=s||{},n=[];u&&n.push(...Object.keys(u)),l&&n.push(...Object.keys(l)),f&&n.push(...Object.keys(f)),n.includes("esbuild")||n.push("esbuild");let m=d.default.resolve(t.cwd,o),y=(0,h.buildSync)((0,p.default)({entryPoints:[m],logLevel:process.env.NODE_ENV==="test"?"debug":"silent",bundle:!0,format:"cjs",write:!1,target:"esnext",platform:"node",external:n},r)),{text:j}=y.outputFiles[0];return(0,g.default)(j,d.default.changeExt(m,".js"))}0&&(module.exports={crossImport}); | ||
var O=Object.create;var c=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var F=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var D=(e,t)=>{for(var r in t)c(e,r,{get:t[r],enumerable:!0})},g=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of v(t))!P.call(e,n)&&n!==r&&c(e,n,{get:()=>t[n],enumerable:!(s=k(t,n))||s.enumerable});return e};var i=(e,t,r)=>(r=e!=null?O(F(e)):{},g(t||!e||!e.__esModule?c(r,"default",{value:e,enumerable:!0}):r,e)),E=e=>g(c({},"__esModule",{value:!0}),e);var N={};D(N,{crossImport:()=>j,default:()=>j});module.exports=E(N);var p=i(require("upath")),y=i(require("fast-glob")),d=i(require("@techor/extend")),b=i(require("require-from-string")),h=require("@techor/fs"),x=require("esbuild");function j(e,t,r){if(t=(0,d.default)({cwd:process.cwd()},t),!e)return;let s=y.default.sync(e,t)[0];if(!s)return;let n=(0,h.readFileAsJSON)("./package.json",{cwd:t.cwd}),{dependencies:l,peerDependencies:f,devDependencies:u}=n||{},o=[];l&&o.push(...Object.keys(l)),f&&o.push(...Object.keys(f)),u&&o.push(...Object.keys(u));let a=p.default.resolve(t.cwd,s),w=(0,x.buildSync)((0,d.default)({entryPoints:[a],logLevel:process.env.NODE_ENV==="test"?"debug":"silent",bundle:!0,format:"cjs",write:!1,target:"esnext",platform:"node",external:o},r)),{text:m}=w.outputFiles[0];return console.log(m),(0,b.default)(m,p.default.changeExt(a,".js"))}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:require-from-string --external:@techor/extend --external:@techor/fs --external:upath","build:esm":"esbuild src/index.ts --bundle --outfile=dist/index.mjs --format=esm --minify --sourcemap --platform=node --external:esbuild --external:fast-glob --external:require-from-string --external:@techor/extend --external:@techor/fs --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":"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.mjs","esnext":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"require":"./dist/index.js","import":"./dist/index.mjs","types":"./dist/index.d.ts"}},"files":["dist"],"dependencies":{"esbuild":"^0.16.9","fast-glob":"^3.2.12","require-from-string":"^2.0.2","@techor/extend":"^2.0.4","@techor/fs":"^2.0.4","upath":"^2.0.1"},"version":"2.0.4"} | ||
{"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:require-from-string --external:@techor/extend --external:@techor/fs --external:upath","build:esm":"esbuild src/index.ts --bundle --outfile=dist/index.mjs --format=esm --minify --sourcemap --platform=node --external:esbuild --external:fast-glob --external:require-from-string --external:@techor/extend --external:@techor/fs --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":"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.mjs","esnext":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"require":"./dist/index.js","import":"./dist/index.mjs","types":"./dist/index.d.ts"}},"files":["dist"],"dependencies":{"@techor/extend":"^2.0.5","@techor/fs":"^2.0.5","esbuild":"^0.17.14","fast-glob":"^3.2.12","require-from-string":"^2.0.2","rollup":"^3.20.2","upath":"^2.0.1"},"version":"2.0.5"} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
15333
7
14
+ Addedrollup@^3.20.2
+ Added@esbuild/android-arm@0.17.19(transitive)
+ Added@esbuild/android-arm64@0.17.19(transitive)
+ Added@esbuild/android-x64@0.17.19(transitive)
+ Added@esbuild/darwin-arm64@0.17.19(transitive)
+ Added@esbuild/darwin-x64@0.17.19(transitive)
+ Added@esbuild/freebsd-arm64@0.17.19(transitive)
+ Added@esbuild/freebsd-x64@0.17.19(transitive)
+ Added@esbuild/linux-arm@0.17.19(transitive)
+ Added@esbuild/linux-arm64@0.17.19(transitive)
+ Added@esbuild/linux-ia32@0.17.19(transitive)
+ Added@esbuild/linux-loong64@0.17.19(transitive)
+ Added@esbuild/linux-mips64el@0.17.19(transitive)
+ Added@esbuild/linux-ppc64@0.17.19(transitive)
+ Added@esbuild/linux-riscv64@0.17.19(transitive)
+ Added@esbuild/linux-s390x@0.17.19(transitive)
+ Added@esbuild/linux-x64@0.17.19(transitive)
+ Added@esbuild/netbsd-x64@0.17.19(transitive)
+ Added@esbuild/openbsd-x64@0.17.19(transitive)
+ Added@esbuild/sunos-x64@0.17.19(transitive)
+ Added@esbuild/win32-arm64@0.17.19(transitive)
+ Added@esbuild/win32-ia32@0.17.19(transitive)
+ Added@esbuild/win32-x64@0.17.19(transitive)
+ Addedesbuild@0.17.19(transitive)
+ Addedfsevents@2.3.3(transitive)
+ Addedrollup@3.29.5(transitive)
- Removed@esbuild/android-arm@0.16.17(transitive)
- Removed@esbuild/android-arm64@0.16.17(transitive)
- Removed@esbuild/android-x64@0.16.17(transitive)
- Removed@esbuild/darwin-arm64@0.16.17(transitive)
- Removed@esbuild/darwin-x64@0.16.17(transitive)
- Removed@esbuild/freebsd-arm64@0.16.17(transitive)
- Removed@esbuild/freebsd-x64@0.16.17(transitive)
- Removed@esbuild/linux-arm@0.16.17(transitive)
- Removed@esbuild/linux-arm64@0.16.17(transitive)
- Removed@esbuild/linux-ia32@0.16.17(transitive)
- Removed@esbuild/linux-loong64@0.16.17(transitive)
- Removed@esbuild/linux-mips64el@0.16.17(transitive)
- Removed@esbuild/linux-ppc64@0.16.17(transitive)
- Removed@esbuild/linux-riscv64@0.16.17(transitive)
- Removed@esbuild/linux-s390x@0.16.17(transitive)
- Removed@esbuild/linux-x64@0.16.17(transitive)
- Removed@esbuild/netbsd-x64@0.16.17(transitive)
- Removed@esbuild/openbsd-x64@0.16.17(transitive)
- Removed@esbuild/sunos-x64@0.16.17(transitive)
- Removed@esbuild/win32-arm64@0.16.17(transitive)
- Removed@esbuild/win32-ia32@0.16.17(transitive)
- Removed@esbuild/win32-x64@0.16.17(transitive)
- Removedesbuild@0.16.17(transitive)
Updated@techor/extend@^2.0.5
Updated@techor/fs@^2.0.5
Updatedesbuild@^0.17.14