Package: node-rollup / 2.38.4-1

workaround-outdated-libs.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Description: workaround for Debian packages that don't export correctly
Author: Xavier Guimard <yadd@debian.org>
Forwarded: not-needed
Last-Update: 2021-01-29

--- a/cli/cli.ts
+++ b/cli/cli.ts
@@ -1,7 +1,7 @@
 //import help from 'help.md';
 const help ='See /usr/share/doc/rollup/help.md or man rollup';
 import { version } from 'package.json';
-import argParser from 'yargs-parser';
+const argParser = require('yargs-parser');
 import { commandAliases } from '../src/utils/options/mergeOptions';
 import run from './run/index';
 
--- a/cli/run/build.ts
+++ b/cli/run/build.ts
@@ -1,5 +1,5 @@
 import { bold, cyan, green } from 'colorette';
-import ms from 'pretty-ms';
+const ms = require('pretty-ms');
 import * as rollup from '../../src/node-entry';
 import { MergedRollupOptions } from '../../src/rollup/types';
 import relativeId from '../../src/utils/relativeId';
--- a/cli/run/getConfigPath.ts
+++ b/cli/run/getConfigPath.ts
@@ -1,6 +1,6 @@
 import { readdirSync } from 'fs';
 import * as path from 'path';
-import relative from 'require-relative';
+const relative = require('require-relative');
 import { handleError } from '../logging';
 
 const DEFAULT_CONFIG_BASE = 'rollup.config';
--- a/cli/run/timings.ts
+++ b/cli/run/timings.ts
@@ -1,5 +1,5 @@
 import { bold, underline } from 'colorette';
-import prettyBytes from 'pretty-bytes';
+const prettyBytes = require('pretty-bytes');
 import { SerializedTimings } from '../../src/rollup/types';
 
 export function printTimings(timings: SerializedTimings) {
--- a/cli/run/watch-cli.ts
+++ b/cli/run/watch-cli.ts
@@ -1,9 +1,9 @@
-import chokidar from 'chokidar';
+const chokidar = require('chokidar');
 import { bold, cyan, green, underline } from 'colorette';
-import dateTime from 'date-time';
+const dateTime = require ('date-time');
 import fs from 'fs';
-import ms from 'pretty-ms';
-import onExit from 'signal-exit';
+const ms = require('pretty-ms');
+const onExit = require('signal-exit');
 import * as rollup from '../../src/node-entry';
 import { MergedRollupOptions, RollupWatcher } from '../../src/rollup/types';
 import relativeId from '../../src/utils/relativeId';
--- a/rollup.config.js
+++ b/rollup.config.js
@@ -50,8 +50,7 @@
 	resolve: ['.js', '.json', '.md'],
 	entries: [
 		{ find: 'help.md', replacement: path.resolve('cli/help.md') },
-		{ find: 'package.json', replacement: path.resolve('package.json') },
-		{ find: 'acorn', replacement: path.resolve('node_modules/acorn/dist/acorn.mjs') }
+		{ find: 'package.json', replacement: path.resolve('package.json') }
 	]
 };
 
--- a/src/utils/options/normalizeInputOptions.ts
+++ b/src/utils/options/normalizeInputOptions.ts
@@ -1,6 +1,6 @@
 import * as acorn from 'acorn';
-import injectClassFields from 'acorn-class-fields';
-import injectStaticClassFeatures from 'acorn-static-class-features';
+const injectClassFields =require('acorn-class-fields');
+const injectStaticClassFeatures = require('acorn-static-class-features');
 import {
 	ExternalOption,
 	HasModuleSideEffects,
--- a/src/watch/fileWatcher.ts
+++ b/src/watch/fileWatcher.ts
@@ -1,4 +1,5 @@
-import chokidar, { FSWatcher } from 'chokidar';
+import { FSWatcher } from 'chokidar';
+const chokidar = require('chokidar');
 import { platform } from 'os';
 import { ChangeEvent, ChokidarOptions } from '../rollup/types';
 import { Task } from './watch';