File: fix-for-rollup-3.patch

package info (click to toggle)
node-immutable 4.3.8-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,640 kB
  • sloc: javascript: 8,266; sh: 17; makefile: 6
file content (72 lines) | stat: -rw-r--r-- 2,218 bytes parent folder | download | duplicates (3)
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
Description: fix for rollup 3
Author: Yadd <yadd@debian.org>
Bug-Debian: https://bugs.debian.org/1022638
Forwarded: not-needed
Last-Update: 2022-10-26

--- a/resources/copyright.js
+++ b/resources/copyright.js
@@ -1,6 +1,6 @@
-import fs from 'fs';
+const fs = require('fs');
 
 const copyright = fs.readFileSync('./LICENSE', 'utf-8');
 const lines = copyright.trim().split('\n');
 
-export default `/**\n${lines.map(line => ` * ${line}`).join('\n')}\n */`;
+module.exports = `/**\n${lines.map(line => ` * ${line}`).join('\n')}\n */`;
--- a/resources/rollup-config-es.js
+++ b/resources/rollup-config-es.js
@@ -1,14 +1,14 @@
-import path from 'path';
-import buble from '@rollup/plugin-buble';
-import commonjs from '@rollup/plugin-commonjs';
-import json from '@rollup/plugin-json';
+const path = require('path');
+const buble = require('@rollup/plugin-buble');
+const commonjs = require('@rollup/plugin-commonjs');
+const json = require('@rollup/plugin-json');
 
-import copyright from './copyright';
+const copyright = require('./copyright');
 
 const SRC_DIR = path.resolve('src');
 const DIST_DIR = path.resolve('dist');
 
-export default {
+module.exports = {
   input: path.join(SRC_DIR, 'Immutable.js'),
   output: {
     banner: copyright,
--- a/resources/rollup-config.js
+++ b/resources/rollup-config.js
@@ -1,13 +1,13 @@
-import fs from 'fs';
-import path from 'path';
-import { minify } from 'uglify-js';
-import buble from '@rollup/plugin-buble';
-import commonjs from '@rollup/plugin-commonjs';
-import json from '@rollup/plugin-json';
+const fs = require('fs');
+const path = require('path');
+const { minify } = require('uglify-js');
+const buble = require('@rollup/plugin-buble');
+const commonjs = require('@rollup/plugin-commonjs');
+const json = require('@rollup/plugin-json');
 //import saveLicense from 'uglify-save-license';
 //import stripBanner from 'rollup-plugin-strip-banner';
 
-import copyright from './copyright';
+const copyright = require('./copyright');
 
 const SRC_DIR = path.resolve('src');
 const DIST_DIR = path.resolve('dist');
@@ -36,7 +36,7 @@
   };
 }
 
-export default {
+module.exports = {
   input: path.join(SRC_DIR, 'Immutable.js'),
   output: {
     banner: copyright,