requirejs-esm 4.1.0 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022-2025 Ferdinand Prantl
3
+ Copyright (c) 2022-2026 Ferdinand Prantl
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -123,6 +123,8 @@ The `esm` plugin supports configuration with the following defaults:
123
123
  mixedAmdAndEsm: false,
124
124
  // Suppress transpiling even if an optimized module has not been loaded yet.
125
125
  onlyAmd: false,
126
+ // Assume AMD/UMD if there're no import or export statements.
127
+ skipIfNoImportExport: false,
126
128
  // Do not insert `"use strict"` expression to the AMD modules. You'd set it
127
129
  // to `false` if your bundler inserts `"use strict"` to the outer scope.
128
130
  useStrict: true,
@@ -182,13 +184,21 @@ The returned object:
182
184
  }
183
185
  ```
184
186
 
187
+ ## Skipping ann Forcing Transformation
188
+
189
+ If the option `skipIfNoImportExport` of `transform` is set to `true` and the input source contains neither `import` nor `export` statements, the input source won't be enclosed in the AMD wrapper. The input will be assumed to be in AMD/UMD format already.
190
+
191
+ If the input source contains a line "// requirejs-esm-skip-file" among the first 10 lines shorter than 100 characters, the input file will not be transformed.
192
+
193
+ If the input source contains a line "// requirejs-esm-process-file" among the first 10 lines shorter than 100 characters and the `transform` option `skipIfNoImportExport` is set to `true`, the input will be transformed nevertheless. The comment has a higher priority than the option.
194
+
185
195
  ## Contributing
186
196
 
187
197
  In lieu of a formal styleguide, take care to maintain the existing coding style. Lint and test your code.
188
198
 
189
199
  ## License
190
200
 
191
- Copyright (c) 2022-2025 Ferdinand Prantl
201
+ Copyright (c) 2022-2026 Ferdinand Prantl
192
202
 
193
203
  Licensed under the MIT license.
194
204
 
@@ -3,7 +3,7 @@
3
3
  // Require module dependencies.
4
4
  const { Command } = require('commander')
5
5
  const glob = require('tiny-glob')
6
- const { readFile, writeFile } = require('fs/promises')
6
+ const { readFile, writeFile } = require('node:fs/promises')
7
7
  const { transform } = require('../dist/api')
8
8
 
9
9
  // Define the command-line interface.
@@ -16,9 +16,10 @@ program.description('Transforms an ESM module to AMD or adapts an AMD module for
16
16
  .option('-o, --output <file>', 'write the adapted module source to a file')
17
17
  .option('-r, --rewrite', 'rewrite the input files with the adapted output')
18
18
  .option('-s, --source-map', 'write inline source maps to the adapted output')
19
+ .option('-a, --skip-if-no-import-export', 'assume AMD/UMD if there\'re no import or export statements')
19
20
  .option('-v, --verbose', 'print progress and call stack in case of error')
20
21
  .argument('[files...]')
21
- .on('--help', function () {
22
+ .on('--help', () => {
22
23
  console.log()
23
24
  console.log('You can use one or more file names or one or more glob patterns to specify one')
24
25
  console.log('or more files. If you set the plugin name to an empty string, modules already')
@@ -35,6 +36,7 @@ const {
35
36
  /*ecma: ecmaVersion,*/
36
37
  plugin: pluginName,
37
38
  sourceMap,
39
+ skipIfNoImportExport,
38
40
  output: outputFile,
39
41
  rewrite,
40
42
  verbose
@@ -45,7 +47,7 @@ if (!args.length) {
45
47
  }
46
48
 
47
49
  // Main entry point.
48
- (async function () {
50
+ ((async () => {
49
51
  try {
50
52
  const files = (await Promise.all(args.map(arg => glob(arg)))).flat()
51
53
  if (!files.length) {
@@ -57,6 +59,7 @@ if (!args.length) {
57
59
  /*ecmaVersion,*/
58
60
  pluginName,
59
61
  sourceMap,
62
+ skipIfNoImportExport,
60
63
  verbose
61
64
  })
62
65
  if (updated) {
@@ -75,4 +78,4 @@ if (!args.length) {
75
78
  console.error((!verbose && error.message) || error)
76
79
  process.exitCode = 1
77
80
  }
78
- }())
81
+ })())
package/dist/api.js CHANGED
@@ -69,7 +69,7 @@
69
69
  // mapped there using the `paths` of `map` configuration properties.
70
70
  if ((sourcePath.charAt(0) === '.' && (sourcePath.charAt(1) === '/' ||
71
71
  sourcePath.charAt(1) === '.' && sourcePath.charAt(2) === '/')) &&
72
- !(needsResolve && needsResolve(sourcePath, currentFile))) {
72
+ !(needsResolve?.(sourcePath, currentFile))) {
73
73
  sourcePath = joinPath(parentDir(currentFile), sourcePath);
74
74
  if (sourcePath.endsWith('.js')) sourcePath = sourcePath.substring(0, sourcePath.length - 3);
75
75
  }
@@ -2080,7 +2080,7 @@
2080
2080
  advanceChar(parser);
2081
2081
  if (parser.currentChar === 61) {
2082
2082
  advanceChar(parser);
2083
- return 4194344;
2083
+ return 4718632;
2084
2084
  }
2085
2085
  return 8913465;
2086
2086
  }
@@ -2123,7 +2123,7 @@
2123
2123
  advanceChar(parser);
2124
2124
  if (parser.currentChar === 61) {
2125
2125
  advanceChar(parser);
2126
- return 4194345;
2126
+ return 4718633;
2127
2127
  }
2128
2128
  return 8913720;
2129
2129
  }
@@ -2139,7 +2139,7 @@
2139
2139
  advanceChar(parser);
2140
2140
  if (parser.currentChar === 61) {
2141
2141
  advanceChar(parser);
2142
- return 4194346;
2142
+ return 4718634;
2143
2143
  }
2144
2144
  return 276824445;
2145
2145
  }
@@ -4805,7 +4805,7 @@
4805
4805
  currentChar = 0;
4806
4806
  exportedNames = new Set();
4807
4807
  exportedBindings = new Set();
4808
- assignable = 1;
4808
+ assignable = 0;
4809
4809
  destructible = 0;
4810
4810
  leadingDecorators = { decorators: [] };
4811
4811
  constructor(source, rawOptions = {}) {
@@ -6094,6 +6094,8 @@
6094
6094
  if ((token & 4194304) === 4194304) {
6095
6095
  if (parser.assignable & 2)
6096
6096
  parser.report(26);
6097
+ if ((token & 524288) === 524288 && parser.assignable & 4)
6098
+ parser.report(26);
6097
6099
  if ((!isPattern && token === 1077936155 && left.type === 'ArrayExpression') ||
6098
6100
  left.type === 'ObjectExpression') {
6099
6101
  reinterpretToPattern(parser, left);
@@ -6459,7 +6461,12 @@
6459
6461
  parser.flags = (parser.flags | 2048) ^ 2048;
6460
6462
  }
6461
6463
  const args = parseArguments(parser, context, privateScope, inGroup);
6462
- parser.assignable = 2;
6464
+ if (!(context & 1) && parser.options.webcompat) {
6465
+ parser.assignable = 4;
6466
+ }
6467
+ else {
6468
+ parser.assignable = 2;
6469
+ }
6463
6470
  expr = parser.finishNode({
6464
6471
  type: 'CallExpression',
6465
6472
  callee: expr,
@@ -6527,7 +6534,12 @@
6527
6534
  }
6528
6535
  else if (parser.getToken() === 67174411) {
6529
6536
  const args = parseArguments(parser, context, privateScope, 0);
6530
- parser.assignable = 2;
6537
+ if (!(context & 1) && parser.options.webcompat) {
6538
+ parser.assignable = 4;
6539
+ }
6540
+ else {
6541
+ parser.assignable = 2;
6542
+ }
6531
6543
  node = parser.finishNode({
6532
6544
  type: 'CallExpression',
6533
6545
  callee: expr,
@@ -7132,9 +7144,9 @@
7132
7144
  }
7133
7145
  else if (parser.getToken() !== 1077936155) {
7134
7146
  destructible |=
7135
- parser.assignable & 2
7136
- ? 16
7137
- : 32;
7147
+ parser.assignable & 1
7148
+ ? 32
7149
+ : 16;
7138
7150
  }
7139
7151
  }
7140
7152
  }
@@ -7164,9 +7176,9 @@
7164
7176
  }
7165
7177
  else if (parser.getToken() !== 1077936155) {
7166
7178
  destructible |=
7167
- parser.assignable & 2
7168
- ? 16
7169
- : 32;
7179
+ parser.assignable & 1
7180
+ ? 32
7181
+ : 16;
7170
7182
  }
7171
7183
  }
7172
7184
  }
@@ -7283,7 +7295,7 @@
7283
7295
  if (parser.destructible & 8)
7284
7296
  parser.report(71);
7285
7297
  argument = parseMemberOrUpdateExpression(parser, context, privateScope, argument, inGroup, 0, tokenStart);
7286
- destructible |= parser.assignable & 2 ? 16 : 0;
7298
+ destructible |= parser.assignable & 1 ? 0 : 16;
7287
7299
  if ((parser.getToken() & 4194304) === 4194304) {
7288
7300
  if (parser.getToken() !== 1077936155)
7289
7301
  destructible |= 16;
@@ -7297,9 +7309,9 @@
7297
7309
  argument = parseConditionalExpression(parser, context, privateScope, argument, tokenStart);
7298
7310
  }
7299
7311
  destructible |=
7300
- parser.assignable & 2
7301
- ? 16
7302
- : 32;
7312
+ parser.assignable & 1
7313
+ ? 32
7314
+ : 16;
7303
7315
  }
7304
7316
  }
7305
7317
  else {
@@ -7328,7 +7340,9 @@
7328
7340
  argument = parseAssignmentExpression(parser, context, privateScope, inGroup, isPattern, tokenStart, argument);
7329
7341
  }
7330
7342
  destructible |=
7331
- parser.assignable & 1 ? 32 : 16;
7343
+ parser.assignable & 1
7344
+ ? 32
7345
+ : 16;
7332
7346
  }
7333
7347
  parser.destructible = destructible;
7334
7348
  if (parser.getToken() !== closingToken && parser.getToken() !== 18)
@@ -7520,7 +7534,9 @@
7520
7534
  : parseObjectLiteralOrPattern(parser, context, scope, privateScope, 0, inGroup, isPattern, kind, origin);
7521
7535
  destructible = parser.destructible;
7522
7536
  parser.assignable =
7523
- destructible & 16 ? 2 : 1;
7537
+ destructible & 16
7538
+ ? 2
7539
+ : 1;
7524
7540
  if (parser.getToken() === 18 || parser.getToken() === 1074790415) {
7525
7541
  if (parser.assignable & 2)
7526
7542
  destructible |= 16;
@@ -7542,9 +7558,9 @@
7542
7558
  value = parseConditionalExpression(parser, context, privateScope, value, tokenStart);
7543
7559
  }
7544
7560
  destructible |=
7545
- parser.assignable & 2
7546
- ? 16
7547
- : 32;
7561
+ parser.assignable & 1
7562
+ ? 32
7563
+ : 16;
7548
7564
  }
7549
7565
  }
7550
7566
  }
@@ -7701,7 +7717,9 @@
7701
7717
  : parseObjectLiteralOrPattern(parser, context, scope, privateScope, 0, inGroup, isPattern, kind, origin);
7702
7718
  destructible = parser.destructible;
7703
7719
  parser.assignable =
7704
- destructible & 16 ? 2 : 1;
7720
+ destructible & 16
7721
+ ? 2
7722
+ : 1;
7705
7723
  if (parser.getToken() === 18 || parser.getToken() === 1074790415) {
7706
7724
  if (parser.assignable & 2) {
7707
7725
  destructible |= 16;
@@ -7721,9 +7739,9 @@
7721
7739
  value = parseConditionalExpression(parser, context, privateScope, value, tokenStart);
7722
7740
  }
7723
7741
  destructible |=
7724
- parser.assignable & 2
7725
- ? 16
7726
- : 32;
7742
+ parser.assignable & 1
7743
+ ? 32
7744
+ : 16;
7727
7745
  }
7728
7746
  }
7729
7747
  }
@@ -7752,7 +7770,7 @@
7752
7770
  else if (parser.getToken() === 67174411) {
7753
7771
  state |= 1;
7754
7772
  value = parseMethodDefinition(parser, context, privateScope, state, inGroup, parser.tokenStart);
7755
- destructible = parser.assignable | 16;
7773
+ destructible = 16;
7756
7774
  }
7757
7775
  else {
7758
7776
  parser.report(134);
@@ -7772,11 +7790,11 @@
7772
7790
  value = parseMemberOrUpdateExpression(parser, context, privateScope, value, inGroup, 0, tokenStart);
7773
7791
  if ((parser.getToken() & 4194304) === 4194304) {
7774
7792
  destructible |=
7775
- parser.assignable & 2
7776
- ? 16
7777
- : token === 1077936155
7793
+ parser.assignable & 1
7794
+ ? token === 1077936155
7778
7795
  ? 0
7779
- : 32;
7796
+ : 32
7797
+ : 16;
7780
7798
  value = parseAssignmentExpressionOrPattern(parser, context, privateScope, inGroup, isPattern, tokenStart, value);
7781
7799
  }
7782
7800
  else if (parser.getToken() === 18 || parser.getToken() === 1074790415) {
@@ -7807,7 +7825,9 @@
7807
7825
  : parseObjectLiteralOrPattern(parser, context, scope, privateScope, 0, inGroup, isPattern, kind, origin);
7808
7826
  destructible = parser.destructible;
7809
7827
  parser.assignable =
7810
- destructible & 16 ? 2 : 1;
7828
+ destructible & 16
7829
+ ? 2
7830
+ : 1;
7811
7831
  if (parser.getToken() === 18 || parser.getToken() === 1074790415) {
7812
7832
  if (parser.assignable & 2)
7813
7833
  destructible |= 16;
@@ -7832,9 +7852,9 @@
7832
7852
  value = parseConditionalExpression(parser, context, privateScope, value, tokenStart);
7833
7853
  }
7834
7854
  destructible |=
7835
- parser.assignable & 2
7836
- ? 16
7837
- : 32;
7855
+ parser.assignable & 1
7856
+ ? 32
7857
+ : 16;
7838
7858
  }
7839
7859
  }
7840
7860
  }
@@ -8439,6 +8459,12 @@
8439
8459
  parser.report(48);
8440
8460
  return parseParenthesizedArrow(parser, context, scope, privateScope, [], canAssign, 1, start);
8441
8461
  }
8462
+ if (!(context & 1) && parser.options.webcompat) {
8463
+ parser.assignable = 4;
8464
+ }
8465
+ else {
8466
+ parser.assignable = 2;
8467
+ }
8442
8468
  return parser.finishNode({
8443
8469
  type: 'CallExpression',
8444
8470
  callee,
@@ -8512,7 +8538,7 @@
8512
8538
  }
8513
8539
  else {
8514
8540
  expr = parseExpression(parser, context, privateScope, 1, 0, tokenStart);
8515
- destructible = parser.assignable;
8541
+ destructible = 0;
8516
8542
  params.push(expr);
8517
8543
  while (consumeOpt(parser, context | 32, 18)) {
8518
8544
  params.push(parseExpression(parser, context, privateScope, 1, 0, tokenStart));
@@ -8520,7 +8546,12 @@
8520
8546
  destructible |= parser.assignable;
8521
8547
  consume(parser, context, 16);
8522
8548
  parser.destructible = destructible | 16;
8523
- parser.assignable = 2;
8549
+ if (!(context & 1) && parser.options.webcompat) {
8550
+ parser.assignable = 4;
8551
+ }
8552
+ else {
8553
+ parser.assignable = 2;
8554
+ }
8524
8555
  return parser.finishNode({
8525
8556
  type: 'CallExpression',
8526
8557
  callee,
@@ -8558,7 +8589,12 @@
8558
8589
  if (destructible & 8) {
8559
8590
  parser.report(62);
8560
8591
  }
8561
- parser.assignable = 2;
8592
+ if (!(context & 1) && parser.options.webcompat) {
8593
+ parser.assignable = 4;
8594
+ }
8595
+ else {
8596
+ parser.assignable = 2;
8597
+ }
8562
8598
  return parser.finishNode({
8563
8599
  type: 'CallExpression',
8564
8600
  callee,
@@ -86090,7 +86126,7 @@
86090
86126
  }
86091
86127
 
86092
86128
  function toIdentifier(input) {
86093
- input = input + '';
86129
+ input = `${input}`;
86094
86130
 
86095
86131
  let name = '';
86096
86132
  for (const c of input) {
@@ -86099,9 +86135,7 @@
86099
86135
 
86100
86136
  name = name.replace(/^[-0-9]+/, '');
86101
86137
 
86102
- name = name.replace(/[-\s]+(.)?/g, function (match, c) {
86103
- return c ? c.toUpperCase() : ''
86104
- });
86138
+ name = name.replace(/[-\s]+(.)?/g, (_match, c) => c ? c.toUpperCase() : '');
86105
86139
 
86106
86140
  if (!isValidIdentifier(name)) {
86107
86141
  name = `_${name}`;
@@ -86337,17 +86371,25 @@
86337
86371
 
86338
86372
  // Updates dependency paths to be prefixed by `esm!` or otherwise updated.
86339
86373
  function updateAmdDeps(amd, options) {
86340
- options.onBeforeUpdate?.(amd);
86374
+ let updated = options.onBeforeUpdate?.({
86375
+ ...options,
86376
+ amd
86377
+ });
86341
86378
 
86342
86379
  const { deps } = amd;
86343
- if (!deps) return
86380
+ if (!deps) {
86381
+ afterUpdate();
86382
+ return updated
86383
+ }
86344
86384
 
86345
86385
  const { sourceFileName: parentName } = options;
86346
86386
  const { elements } = deps;
86347
- if (!elements.length) return
86387
+ if (!elements.length) {
86388
+ afterUpdate();
86389
+ return updated
86390
+ }
86348
86391
 
86349
86392
  const { resolvePath } = options;
86350
- let updated;
86351
86393
  for (const element of elements) {
86352
86394
  if (element.type === 'Literal') {
86353
86395
  const moduleName = element.value;
@@ -86359,9 +86401,27 @@
86359
86401
  }
86360
86402
  }
86361
86403
 
86362
- updated ||= options.onAfterUpdate?.(amd);
86404
+ afterUpdate();
86363
86405
 
86364
86406
  return updated
86407
+
86408
+ function afterUpdate() {
86409
+ const updatedNow = options.onAfterUpdate?.({
86410
+ ...options,
86411
+ amd
86412
+ });
86413
+ updated ||= updatedNow;
86414
+ }
86415
+ }
86416
+
86417
+ function callAmdUpdateHooks(amd, options) {
86418
+ options = {
86419
+ ...options,
86420
+ amd
86421
+ };
86422
+ const updatedBefore = options.onBeforeUpdate?.(options);
86423
+ const updatedAfter = options.onAfterUpdate?.(options);
86424
+ return updatedBefore || updatedAfter
86365
86425
  }
86366
86426
 
86367
86427
  function _generateUid(name, i) {
@@ -86692,7 +86752,7 @@
86692
86752
  const importVar = generateUidIdentifier(exportSource.value, program);
86693
86753
  importVars.push(importVar);
86694
86754
 
86695
- for (let specifier of specifiers) {
86755
+ for (const specifier of specifiers) {
86696
86756
  const { exported, local } = specifier;
86697
86757
  const { name } = local;
86698
86758
  let localName;
@@ -86766,6 +86826,17 @@
86766
86826
  }
86767
86827
  }
86768
86828
 
86829
+ // no imports and exports, do not wrap to AMD module, if AMD/UMD should be assumed
86830
+ if (options.skipIfNoImportExport && !(importPaths.length || hasExport)) {
86831
+ options.onAfterTransform?.({
86832
+ ...options,
86833
+ updated: false,
86834
+ program,
86835
+ callbackBody: body
86836
+ });
86837
+ return false
86838
+ }
86839
+
86769
86840
  // adding define wrapper
86770
86841
  if (hasExport && needReturnExport) {
86771
86842
  let returnStat;
@@ -86798,10 +86869,13 @@
86798
86869
 
86799
86870
  options.onAfterTransform?.({
86800
86871
  ...options,
86872
+ updated: true,
86801
86873
  program,
86802
86874
  callbackBody: body
86803
86875
  });
86804
86876
 
86877
+ return true
86878
+
86805
86879
  function addExportStatement({ exported, local }) {
86806
86880
  const asName = exported.name;
86807
86881
  if (asName !== 'default') {
@@ -86883,20 +86957,37 @@
86883
86957
  return arrayExpression(importPaths)
86884
86958
  }
86885
86959
 
86960
+ // Check if one of the first 10 lines shorter than 100 characters contains
86961
+ // "// requirejs-esm-skip-file" or // requirejs-esm-process-file".
86962
+ function processOrSkipByComment(text) {
86963
+ for (let start = 0, i = 0; i < 10; ++i) {
86964
+ const endLine = text.indexOf('\n', start);
86965
+ if (endLine < 0 || endLine > 100) break
86966
+ const line = text.substring(start, endLine);
86967
+ const comment = /^\s*\/\//.test(line);
86968
+ if (!comment) break
86969
+ const directive = /^\s*\/\/\s*requirejs-esm-(skip|process)-file\s*$/.exec(line);
86970
+ if (directive) {
86971
+ return directive[1] === 'process'
86972
+ }
86973
+ start = endLine + 1;
86974
+ }
86975
+ }
86976
+
86886
86977
  function transformAst(program, options = {}) {
86887
86978
  const amds = detectDefinesOrRequires(program);
86888
86979
  const { length } = amds;
86889
86980
  const result = {};
86890
86981
  if (length) {
86891
86982
  result.amd = true;
86892
- if (options.resolvePath) {
86893
- for (const amd of amds) {
86894
- result.updated ||= updateAmdDeps(amd, options);
86895
- }
86983
+ for (const amd of amds) {
86984
+ const updated = options.resolvePath
86985
+ ? updateAmdDeps(amd, options)
86986
+ : callAmdUpdateHooks(amd, options);
86987
+ result.updated ||= updated;
86896
86988
  }
86897
86989
  } else {
86898
- transformEsmToAmd(program, options);
86899
- result.updated = true;
86990
+ result.updated = transformEsmToAmd(program, options);
86900
86991
  }
86901
86992
  return result
86902
86993
  }
@@ -86907,6 +86998,8 @@
86907
86998
  // Method to update paths of module dependencies, to prefix JavaScript module
86908
86999
  // name with `esm!`, above all.
86909
87000
  resolvePath: resolvePath$1 = resolvePath,
87001
+ // Assume AMD/UMD if there're no import or export statements.
87002
+ skipIfNoImportExport,
86910
87003
  // ecmaVersion = 2020,
86911
87004
  // Do not insert `"use strict"` expression to the AMD modules. You'd set it
86912
87005
  // to `false` if your bundler inserts `"use strict"` to the outer scope.
@@ -86921,8 +87014,15 @@
86921
87014
  onBeforeUpdate,
86922
87015
  onAfterUpdate
86923
87016
  } = {}) {
87017
+ const processOrSkip = processOrSkipByComment(text);
87018
+ if (processOrSkip === false) {
87019
+ return { code: text, map: null, updated: false }
87020
+ } else if (processOrSkip === true) {
87021
+ skipIfNoImportExport = undefined;
87022
+ }
87023
+
86924
87024
  // const ast = parse(text, { ecmaVersion, sourceType: 'module', locations: true })
86925
- let ast = parseModule(text, { next: true, loc: true });
87025
+ const ast = parseModule(text, { next: true, loc: true });
86926
87026
 
86927
87027
  const options = {
86928
87028
  sourceFileName: file,
@@ -86930,6 +87030,7 @@
86930
87030
  resolvePath: resolvePath$1,
86931
87031
  originalResolvePath: resolvePath,
86932
87032
  useStrict,
87033
+ skipIfNoImportExport,
86933
87034
  onBeforeTransform,
86934
87035
  onAfterTransform,
86935
87036
  onBeforeUpdate,
@@ -86963,6 +87064,7 @@
86963
87064
 
86964
87065
  exports.detectDefinesOrRequires = detectDefinesOrRequires;
86965
87066
  exports.detectImportsAndExports = detectImportsAndExports;
87067
+ exports.processOrSkipByComment = processOrSkipByComment;
86966
87068
  exports.resolvePath = resolvePath;
86967
87069
  exports.transform = transform;
86968
87070
  exports.transformAst = transformAst;