Package: node-rollup / 2.38.4-1

dont-embed-acorn.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Description: don't embed acorn
Author: Xavier Guimard <yadd@debian.org>
Forwarded: not-needed
Last-Update: 2020-10-01

--- a/src/Graph.ts
+++ b/src/Graph.ts
@@ -1,4 +1,4 @@
-import * as acorn from 'acorn';
+const acorn = require('acorn');
 import GlobalScope from './ast/scopes/GlobalScope';
 import { PathTracker } from './ast/utils/PathTracker';
 import ExternalModule from './ExternalModule';
--- a/src/Module.ts
+++ b/src/Module.ts
@@ -1,4 +1,4 @@
-import * as acorn from 'acorn';
+const acorn = require('acorn');
 import { locate } from 'locate-character';
 import MagicString from 'magic-string';
 import extractAssignedNames from 'rollup-pluginutils/src/extractAssignedNames';
--- a/src/ModuleLoader.ts
+++ b/src/ModuleLoader.ts
@@ -1,4 +1,4 @@
-import * as acorn from 'acorn';
+const acorn = require('acorn');
 import ExternalModule from './ExternalModule';
 import Graph from './Graph';
 import Module from './Module';
--- a/src/utils/pureComments.ts
+++ b/src/utils/pureComments.ts
@@ -1,6 +1,6 @@
-import * as acorn from 'acorn';
+const acorn = require('acorn');
 // @ts-ignore
-import { base as basicWalker } from 'acorn-walk';
+const basicWalker = require('acorn-walk').base;
 import { CommentDescription } from '../Module';
 
 // patch up acorn-walk until class-fields are officially supported