es-module-lexer
Advanced tools
Comparing version 0.3.3 to 0.3.4
@@ -0,1 +1,9 @@ | ||
0.3.4 | ||
* Use UTF16 encoding for better performance, and removing reliance on TextEncoder (https://github.com/guybedford/es-module-lexer/pull/15) | ||
0.3.3 | ||
* Minification improvements | ||
* Fix for TextEncoder global being missing in Node.js 10 | ||
* Fix CJS build to end in .cjs extension for modules compatibility | ||
0.3.2 | ||
@@ -2,0 +10,0 @@ * Fix export declaration parse bugs (https://github.com/guybedford/es-module-lexer/pull/11) |
@@ -1,2 +0,2 @@ | ||
/* es-module-lexer 0.3.3 */ | ||
export function parse(A){if(!B)return init.then(()=>parse(A));const Q=C(A),E=Q.byteLength-(B.memory.buffer.byteLength-B.__heap_base.value);if(E>0&&B.memory.grow(Math.ceil(E/1024/64)),function(A,Q,B){const C=A.byteLength>>2,E=new Uint32Array(Q,B,C),I=new Uint32Array(A.buffer,A.byteOffset,C);for(let A=0;A<C;A++)E[A]=I[A];let g=C<<2;const L=new Uint8Array(Q);for(;g!==A.byteLength;)L[B+g]=A[g++];L[B+A.byteLength]=0}(Q,B.memory.buffer,B.salloc(Q.byteLength)),!B.parse()){const A=B.e(),Q=new Error(`Parse error at ${A}.`);throw Q.loc=A,Q}const I=[],g=[];for(;B.ri();)I.push({s:B.is(),e:B.ie(),d:B.id()});for(;B.re();)g.push(A.slice(B.es(),B.ee()));return[I,g]}const A="AGFzbQEAAAABXQ1gAABgAX8Bf2AFf39/f38AYAJ/fwBgAAF/YAF/AGADf39/AX9gAn9/AX9gCH9/f39/f39/AX9gB39/f39/f38Bf2AGf39/f39/AX9gBX9/f39/AX9gBH9/f38BfwMuLQABAgMEBAQEBAQEBAEFAAAAAAAAAAEBAQEAAAUGBwgJCgsMBAUJAQEBAQQKCAQFAXABAQEFAwEAAQYVA38BQeDIAAt/AEHgyAALfwBB2AgLB10NBm1lbW9yeQIAC19faGVhcF9iYXNlAwEKX19kYXRhX2VuZAMCBnNhbGxvYwABAWUABAJpcwAFAmllAAYCa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ACAALQAFIAZHDQAgAC0ABiAHRiEICyAICwtoAwBBgAgLAQAAQYQICwgABAAAYCQAAABBjAgLTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";let Q,B,C="undefined"!=typeof TextEncoder?A=>(new TextEncoder).encode(A):Buffer.from;if("undefined"!=typeof Buffer)Q=Buffer.from(A,"base64");else{const B=atob(A),C=B.length;Q=new Uint8Array(C);for(let A=0;A<C;A++)Q[A]=B.charCodeAt(A)}export const init=WebAssembly.compile(Q).then(WebAssembly.instantiate).then(({exports:A})=>{B=A}); | ||
/* es-module-lexer 0.3.4 */ | ||
export function parse(A){if(!B)return init.then(()=>parse(A));const Q=2*A.length-(B.memory.buffer.byteLength-B.__heap_base.value);Q>0&&B.memory.grow(Math.ceil(Q/1024/64));const C=new Uint16Array(B.memory.buffer,B.salloc(A.length),A.length+1);if(function(A,Q){const B=A.length;for(let C=0;C<B;C++)Q[C]=A.charCodeAt(C)}(A,C),!B.parse()){const A=B.e(),Q=new Error(`Parse error at ${A}.`);throw Q.loc=A,Q}const E=[],I=[];for(;B.ri();)E.push({s:B.is(),e:B.ie(),d:B.id()});for(;B.re();)I.push(A.slice(B.es(),B.ee()));return[E,I]}const A="AGFzbQEAAAABXQ1gAABgAX8Bf2AFf39/f38AYAJ/fwBgAAF/YAN/f38Bf2ACf38Bf2AIf39/f39/f38Bf2AHf39/f39/fwF/YAZ/f39/f38Bf2AFf39/f38Bf2AEf39/fwF/YAF/AAMsKwABAgMEBAQEBAQEBAEAAAAAAAAAAQEBAQAABQYHCAkKCwQMCAEBAQEECQcEBQFwAQEBBQMBAAEGFQN/AUHgyAALfwBB4MgAC38AQdQICwddDQZtZW1vcnkCAAtfX2hlYXBfYmFzZQMBCl9fZGF0YV9lbmQDAgZzYWxsb2MAAQFlAAQCaXMABQJpZQAGAmlkAAcCZXMACAJlZQAJ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IAAvAQYgBEcNACAALwEIIAVHDQAgAC8BCiAGRiEHCyAHCzUBAX8CQAJAIABBd2pB//8DcSIBQRhPDQBBn4CABCABdkEBcQ0BCyAAQS5HIAAQJXEPC0EBC2MBAX8CQAJAIABBX2oiAUEFSw0AQQEgAXRBMXENAQsgAEH4/wNxQShGDQAgAEFGakH//wNxQQZJDQACQCAAQaV/aiIBQQNLDQAgAUEBRw0BCyAAQYV/akH//wNxQQRJDwtBAQtlAQJ/AkACQANAAkAgAEH//wNxIgFBd2oiAkEXSw0AQQEgAnRBn4CABHENAgsgACECIAEQJQ0CQQAhAkEAQQAoAtAIIgBBAmo2AtAIIAAvAQIiAA0ADAILCyAAIQILIAJB//8DcQsvAQF/AkACQCAAQXdqQf//A3EiAUEYTw0AQZ+AgAQgAXZBAXENAQsgABAlDwtBAQtsAQJ/QQAoAtAIIQACQANAAkAgAC8BAiIBQdwARw0AIABBBGohAAwBCyAAQQJqIQACQAJAIAFBDUsNAEEBIAF0QYHIAHENAQsgAUHdAEcNAQwCCwtBACAANgLQCBAYIAEPC0EAIAA2AtAIIAELPwEBf0EAIQYCQCAALwEAIAFHDQAgAC8BAiACRw0AIAAvAQQgA0cNACAALwEGIARHDQAgAC8BCCAFRiEGCyAGC1MBAX9BACEIAkAgAC8BACABRw0AIAAvAQIgAkcNACAALwEEIANHDQAgAC8BBiAERw0AIAAvAQggBUcNACAALwEKIAZHDQAgAC8BDCAHRiEICyAICwtlAwBBgAgLAgAAAEGECAsIAAQAAGAkAAAAQYwIC0gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";let Q,B;if("undefined"!=typeof Buffer)Q=Buffer.from(A,"base64");else{const B=atob(A),C=B.length;Q=new Uint8Array(C);for(let A=0;A<C;A++)Q[A]=B.charCodeAt(A)}export const init=WebAssembly.compile(Q).then(WebAssembly.instantiate).then(({exports:A})=>{B=A}); |
{ | ||
"name": "es-module-lexer", | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"description": "Lexes ES modules returning their import/export metadata", | ||
@@ -5,0 +5,0 @@ "main": "dist/lexer.cjs", |
@@ -5,3 +5,3 @@ # ES Module Lexer | ||
A very small single JS file (4KiB gzipped) that includes inlined Web Assembly to [very fast](#benchmarks) source analysis for ES modules only. | ||
A very small single JS file (4KiB gzipped) that includes inlined Web Assembly for [very fast source analysis](#benchmarks) of ECMAScript syntax only. | ||
@@ -12,2 +12,6 @@ Outputs the list of exports and locations of import specifiers, including dynamic import and import meta handling. | ||
### Environment Support | ||
Node.js 10+, and [all browsers with Web Assembly support](https://caniuse.com/#search=web%20assembly). | ||
### Usage | ||
@@ -83,21 +87,21 @@ | ||
test/samples/*.js (2150 KiB) | ||
> 29ms | ||
> 22ms | ||
Warm Runs (average of 25 runs) | ||
test/samples/d3.js (491 KiB) | ||
> 5.6ms | ||
> 4.2ms | ||
test/samples/d3.min.js (274 KiB) | ||
> 3.44ms | ||
> 2.16ms | ||
test/samples/magic-string.js (34 KiB) | ||
> 0.36ms | ||
> 0.04ms | ||
test/samples/magic-string.min.js (20 KiB) | ||
> 0.04ms | ||
> 0ms | ||
test/samples/rollup.js (902 KiB) | ||
> 9.24ms | ||
> 6.2ms | ||
test/samples/rollup.min.js (429 KiB) | ||
> 5.24ms | ||
> 3.2ms | ||
Warm Runs, All Samples (average of 25 runs) | ||
test/samples/*.js (2150 KiB) | ||
> 24.8ms | ||
> 14.08ms | ||
``` | ||
@@ -104,0 +108,0 @@ |
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
137
24467