File: 2001_babel_downgrade.patch

package info (click to toggle)
node-rdf-canonize 1.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 332 kB
  • sloc: makefile: 15; sh: 4
file content (83 lines) | stat: -rw-r--r-- 2,615 bytes parent folder | 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
Description: Use Babel 6.
Author: Jonas Smedegaard <dr@jones.dk>
Forwarded: not-needed
Last-Update: 2019-02-25
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/package.json
+++ b/package.json
@@ -33,6 +33,10 @@
     "semver": "^5.6.0"
   },
   "devDependencies": {
+    "babel-cli": "^6.26.0",
+    "babel-loader": "^7.1.2",
+    "babel-plugin-transform-runtime": "^6.26.0",
+    "babel-preset-env": "^1.6.0",
     "@babel/cli": "^7.2.3",
     "@babel/core": "^7.2.2",
     "@babel/plugin-transform-modules-commonjs": "^7.2.0",
@@ -67,7 +71,7 @@
     "prepublish": "npm run build",
     "build": "npm run build-webpack && npm run build-node6",
     "build-webpack": "webpack",
-    "build-node6": "BROWSERSLIST='node 6' babel --no-babelrc lib --out-dir dist/node6/lib --presets=@babel/preset-env",
+    "build-node6": "BROWSERSLIST='node 6' babel --no-babelrc lib --out-dir dist/node6/lib --presets=env",
     "fetch-test-suite": "if [ ! -e test-suites/normalization ]; then git clone --depth 1 https://github.com/json-ld/normalization.git test-suites/normalization; fi",
     "test": "mocha -R spec --check-leaks",
     "benchmark": "node benchmark/benchmark.js",
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -6,6 +6,7 @@
  * Copyright 2010-2017 Digital Bazaar, Inc.
  */
 const path = require('path');
+const webpack = require('webpack');
 const webpackMerge = require('webpack-merge');
 
 // build multiple outputs
@@ -44,10 +45,9 @@
           use: {
             loader: 'babel-loader',
             options: {
-              presets: ['@babel/preset-env'],
+              presets: ['env'],
               plugins: [
-                '@babel/plugin-transform-modules-commonjs',
-                '@babel/plugin-transform-runtime'
+                'transform-runtime'
               ]
             }
           }
@@ -69,7 +69,6 @@
 
   // plain unoptimized unminified bundle
   const bundle = webpackMerge(common, {
-    mode: 'development',
     output: {
       path: path.join(__dirname, 'dist'),
       filename: info.filenameBase + '.js',
@@ -86,7 +85,6 @@
 
   // optimized and minified bundle
   const minify = webpackMerge(common, {
-    mode: 'production',
     output: {
       path: path.join(__dirname, 'dist'),
       filename: info.filenameBase + '.min.js',
@@ -95,7 +93,6 @@
     },
     devtool: 'cheap-module-source-map',
     plugins: [
-      /*
       new webpack.optimize.UglifyJsPlugin({
         compress: {
           warnings: true
@@ -105,7 +102,6 @@
         }
         //beautify: true
       })
-      */
     ]
   });
   if(info.library === null) {