File: fix-for-rollup-3.patch

package info (click to toggle)
node-rollup-plugin-node-polyfills 0.2.1%2Bdfsg%2B~0.11.0-1%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 4,748 kB
  • sloc: javascript: 33,166; makefile: 5
file content (47 lines) | stat: -rw-r--r-- 1,502 bytes parent folder | download | duplicates (2)
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
Description: fix for rollup 3
Author: Yadd <yadd@debian.org>
Bug-Debian: https://bugs.debian.org/1022651
Forwarded: not-needed
Last-Update: 2022-11-02

--- a/rollup-plugin-polyfill-node/package.json
+++ b/rollup-plugin-polyfill-node/package.json
@@ -2,7 +2,7 @@
   "name": "rollup-plugin-polyfill-node",
   "version": "0.11.0",
   "main": "dist/index.js",
-  "module": "dist/es/index.js",
+  "module": "dist/es/index.mjs",
   "types": "dist/index.d.ts",
   "scripts": {
     "pretest": "npm run build",
--- a/rollup-plugin-polyfill-node/rollup.config.mjs
+++ b/rollup-plugin-polyfill-node/rollup.config.mjs
@@ -8,6 +8,7 @@
 	],
 	output: ['es','cjs'].map((format) => ({
 		dir: `dist/${format==='es' ? 'es' : ''}`,
+		entryFileNames: `index.${format==='es' ? 'mjs' : 'js'}`,
 		exports: 'auto',
 		format,
 		generatedCode: {
--- a/rollup-plugin-polyfill-node/test/index.js
+++ b/rollup-plugin-polyfill-node/test/index.js
@@ -67,7 +67,7 @@
     }).then(function() {
       done(new Error ('should not get here'))
     }, function (err) {
-      if (err.message === `"diffieHellman" is not exported by "\u0000polyfill-node.crypto.js", imported by "test/examples/crypto-broken.js".`) {
+      if (err.message.match(/diffieHellman.* is not exported by .*polyfill-node.crypto.js.* imported by /)) {
         done();
         return;
       }
--- a/rollup.config.js
+++ b/rollup.config.js
@@ -1,5 +1,5 @@
 
-export default {
+module.exports = {
 	input: 'dist-transpiled/index.js',
 	external: [
 		'path',