File tree Expand file tree Collapse file tree 4 files changed +35
-0
lines changed Expand file tree Collapse file tree 4 files changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ nodejs 20.9.0
Original file line number Diff line number Diff line change @@ -191,6 +191,22 @@ async function processModule ({
191
191
continue
192
192
}
193
193
194
+ if ( NODE_MAJOR >= 15 ) {
195
+ // const modName = `v${Buffer.from(n, 'utf-8').toString('hex')}`
196
+ const modName = normalizeModName ( n )
197
+
198
+ setters . set ( `$${ modName } ` + ns , `
199
+ let $${ modName } = ${ ns } ["${ n } "]
200
+ export { $${ modName } as "${ n } " }
201
+ set["${ n } "] = (v) => {
202
+ $${ modName } = v
203
+ return true
204
+ }
205
+ ` )
206
+
207
+ continue
208
+ }
209
+
194
210
setters . set ( `$${ n } ` + ns , `
195
211
let $${ n } = ${ ns } .${ n }
196
212
export { $${ n } as ${ n } }
Original file line number Diff line number Diff line change
1
+ export const foo = 41
2
+
3
+ export { foo as "non-valid-identifier" }
Original file line number Diff line number Diff line change
1
+ // Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2.0 License.
2
+ //
3
+ // This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2021 Datadog, Inc.
4
+
5
+ import Hook from '../../index.js'
6
+ import * as stringExportMjs from '../fixtures/string-export.mjs'
7
+ import { strictEqual } from 'assert'
8
+
9
+ Hook ( ( exports , name ) => {
10
+ if ( name . match ( / f i x t u r e s \/ s t r i n g - e x p o r t \. m j s / ) ) {
11
+ exports [ 'non-valid-identifier' ] += 1
12
+ }
13
+ } )
14
+
15
+ strictEqual ( stringExportMjs [ 'non-valid-identifier' ] , 42 )
You can’t perform that action at this time.
0 commit comments