File: 2003_avoid_browser_modules.patch

package info (click to toggle)
node-esquery 1.4.2~ds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 372 kB
  • sloc: javascript: 2,041; makefile: 28; sh: 1
file content (70 lines) | stat: -rw-r--r-- 2,255 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Description: skip generate browser code
 We target only Nodejs (not browsers) for now,
 because Nodejs module transform-es2017-object-entries is missing.
Forwarded: no
Author: Jonas Smedegaard <dr@jones.dk>
Last-Update: 2020-12-16
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/package.json
+++ b/package.json
@@ -4,11 +4,10 @@
   "author": "Joel Feenstra <jrfeenst+esquery@gmail.com>",
   "contributors": [],
   "description": "A query library for ECMAScript AST using a CSS selector like query language.",
-  "main": "dist/esquery.min.js",
-  "module": "dist/esquery.esm.min.js",
+  "main": "dist/esquery.js",
+  "module": "dist/esquery.esm.js",
   "files": [
     "dist/*.js",
-    "dist/*.map",
     "parser.js",
     "license.txt",
     "README.md"
--- a/rollup.config.js
+++ b/rollup.config.js
@@ -1,10 +1,10 @@
-import { terser } from 'rollup-plugin-terser';
+//import { terser } from 'rollup-plugin-terser';
 
 import nodeResolve from '@rollup/plugin-node-resolve';
 import commonjs from '@rollup/plugin-commonjs';
 import json from '@rollup/plugin-json';
 
-import babel from 'rollup-plugin-babel';
+//import babel from 'rollup-plugin-babel';
 import packageJson from './package.json';
 
 /**
@@ -42,23 +42,23 @@
             json(),
             nodeResolve(),
             commonjs(),
-            babel()
+            //babel()
         ]
     };
     if (lite) {
         nonMinified.external = Object.keys(packageJson.dependencies);
     }
-    if (minifying) {
-        nonMinified.plugins.push(terser());
-    }
+    //if (minifying) {
+    //    nonMinified.plugins.push(terser());
+    //}
     return nonMinified;
 }
 
 export default [
-    getRollupObject({ minifying: true, format: 'umd' }),
+    //getRollupObject({ minifying: true, format: 'umd' }),
     getRollupObject({ minifying: false, format: 'umd' }),
-    getRollupObject({ minifying: true, format: 'esm' }),
+    //getRollupObject({ minifying: true, format: 'esm' }),
     getRollupObject({ minifying: false, format: 'esm' }),
-    getRollupObject({ minifying: true, format: 'umd', lite: true }),
+    //getRollupObject({ minifying: true, format: 'umd', lite: true }),
     getRollupObject({ minifying: false, format: 'umd', lite: true })
 ];