mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
``` > monitor-oxc@ test /home/runner/work/monitor-oxc/monitor-oxc > node src/main.test.mjs file:///home/runner/work/monitor-oxc/monitor-oxc/node_modules/.pnpm/inquirer@[10](https://github.com/oxc-project/monitor-oxc/actions/runs/10038139357/job/27739464680#step:8:11).0.1/node_modules/inquirer/dist/esm/ui/prompt.mjs:2 import { defer, EMPTY, from, of, concatMap, filter, reduce, isObservable, lastValueFrom } from "rxjs"; ^^^^^ SyntaxError: Named export 'EMPTY' not found. The requested module 'rxjs' is a CommonJS module, which may not support all module.exports as named exports. CommonJS modules can always be imported via the default export, for example using: import pkg from 'rxjs'; const { defer, EMPTY, from, of, concatMap, filter, reduce, isObservable, lastValueFrom } = pkg; at ModuleJob._instantiate (node:internal/modules/esm/module_job:134:21) at async ModuleJob.run (node:internal/modules/esm/module_job:217:5) at async ModuleLoader.import (node:internal/modules/esm/loader:316:24) at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:[12](https://github.com/oxc-project/monitor-oxc/actions/runs/10038139357/job/27739464680#step:8:13)3:5) Node.js v20.15.1 ``` Export is undefined when `enumerable` is "!0". See `https://github.com/nodejs/cjs-module-lexer/issues/64`
109 lines
2.8 KiB
Text
109 lines
2.8 KiB
Text
---
|
|
source: crates/oxc_minifier/tests/mod.rs
|
|
expression: snapshot
|
|
---
|
|
==================================== SOURCE ====================================
|
|
let x = 1 + 1
|
|
|
|
=================================== MINIFIED ===================================
|
|
let x = 2;
|
|
|
|
|
|
==================================== SOURCE ====================================
|
|
function foo() { return 1 + 1; }
|
|
|
|
=================================== MINIFIED ===================================
|
|
function foo() {
|
|
return 2;
|
|
}
|
|
|
|
|
|
==================================== SOURCE ====================================
|
|
'' + true
|
|
|
|
=================================== MINIFIED ===================================
|
|
;
|
|
'true';
|
|
|
|
|
|
==================================== SOURCE ====================================
|
|
'' + false
|
|
|
|
=================================== MINIFIED ===================================
|
|
;
|
|
'false';
|
|
|
|
|
|
==================================== SOURCE ====================================
|
|
'' + null
|
|
|
|
=================================== MINIFIED ===================================
|
|
;
|
|
'null';
|
|
|
|
|
|
==================================== SOURCE ====================================
|
|
false + null
|
|
|
|
=================================== MINIFIED ===================================
|
|
!1 + null;
|
|
|
|
|
|
==================================== SOURCE ====================================
|
|
'1' + '1'
|
|
|
|
=================================== MINIFIED ===================================
|
|
;
|
|
'11';
|
|
|
|
|
|
==================================== SOURCE ====================================
|
|
NaN + NaN
|
|
|
|
=================================== MINIFIED ===================================
|
|
NaN + NaN;
|
|
|
|
|
|
==================================== SOURCE ====================================
|
|
'' + NaN
|
|
|
|
=================================== MINIFIED ===================================
|
|
;
|
|
'NaN';
|
|
|
|
|
|
==================================== SOURCE ====================================
|
|
let x = 1; let y = x + 1
|
|
|
|
=================================== MINIFIED ===================================
|
|
let x = 1, y = x + 1;
|
|
|
|
|
|
==================================== SOURCE ====================================
|
|
var x = 1; x + 1 === 2
|
|
|
|
=================================== MINIFIED ===================================
|
|
var x = 1;
|
|
x + 1 === 2;
|
|
|
|
|
|
==================================== SOURCE ====================================
|
|
var y = 1; 1 + y === 2
|
|
|
|
=================================== MINIFIED ===================================
|
|
var y = 1;
|
|
1 + y === 2;
|
|
|
|
|
|
==================================== SOURCE ====================================
|
|
null - Number(1)
|
|
|
|
=================================== MINIFIED ===================================
|
|
null - Number(1);
|
|
|
|
|
|
==================================== SOURCE ====================================
|
|
1 + 1.0000001
|
|
|
|
=================================== MINIFIED ===================================
|
|
2.0000001000000003;
|