|
| 1 | +diff --git a/node_modules/tsdx/dist/.progress-estimator/5e1a1bc72a1c85f144986cb7aa3d91e6fd42e1c4 b/node_modules/tsdx/dist/.progress-estimator/5e1a1bc72a1c85f144986cb7aa3d91e6fd42e1c4 |
| 2 | +index d922cf9..cdc6612 100644 |
| 3 | +--- a/node_modules/tsdx/dist/.progress-estimator/5e1a1bc72a1c85f144986cb7aa3d91e6fd42e1c4 |
| 4 | ++++ b/node_modules/tsdx/dist/.progress-estimator/5e1a1bc72a1c85f144986cb7aa3d91e6fd42e1c4 |
| 5 | +@@ -1,2 +1,10 @@ |
| 6 | + 1063 |
| 7 | + 1221 |
| 8 | ++15096 |
| 9 | ++11034 |
| 10 | ++5894 |
| 11 | ++5488 |
| 12 | ++9926 |
| 13 | ++3208 |
| 14 | ++8393 |
| 15 | ++19165 |
| 16 | +\ No newline at end of file |
| 17 | +diff --git a/node_modules/tsdx/dist/.progress-estimator/9a3492e73be0eb3875889eb84075f018f90b4f72 b/node_modules/tsdx/dist/.progress-estimator/9a3492e73be0eb3875889eb84075f018f90b4f72 |
| 18 | +index 519236e..94cdd6d 100644 |
| 19 | +--- a/node_modules/tsdx/dist/.progress-estimator/9a3492e73be0eb3875889eb84075f018f90b4f72 |
| 20 | ++++ b/node_modules/tsdx/dist/.progress-estimator/9a3492e73be0eb3875889eb84075f018f90b4f72 |
| 21 | +@@ -1,2 +1,10 @@ |
| 22 | + 1973 |
| 23 | + 2032 |
| 24 | ++3131 |
| 25 | ++3763 |
| 26 | ++3766 |
| 27 | ++3102 |
| 28 | ++3044 |
| 29 | ++3216 |
| 30 | ++3116 |
| 31 | ++3078 |
| 32 | +\ No newline at end of file |
1 | 33 | diff --git a/node_modules/tsdx/dist/createRollupConfig.js b/node_modules/tsdx/dist/createRollupConfig.js
|
2 |
| -index d97884e..872a117 100644 |
| 34 | +index d97884e..ff298b8 100644 |
3 | 35 | --- a/node_modules/tsdx/dist/createRollupConfig.js
|
4 | 36 | +++ b/node_modules/tsdx/dist/createRollupConfig.js
|
5 |
| -@@ -105,10 +105,11 @@ function createRollupConfig(format, env, opts) { |
6 |
| - rollup_plugin_terser_1.terser({ |
7 |
| - sourcemap: true, |
8 |
| - output: { comments: false }, |
| 37 | +@@ -15,108 +15,105 @@ const rollup_plugin_typescript2_1 = tslib_1.__importDefault(require("rollup-plug |
| 38 | + const rollup_plugin_preserve_shebang_1 = tslib_1.__importDefault(require("rollup-plugin-preserve-shebang")); |
| 39 | + const replacements = [{ original: 'lodash', replacement: 'lodash-es' }]; |
| 40 | + const babelOptions = { |
| 41 | +- exclude: /node_modules/, |
| 42 | +- plugins: [ |
| 43 | +- 'annotate-pure-calls', |
| 44 | +- 'dev-expression', |
| 45 | +- ['transform-rename-import', { replacements }], |
| 46 | +- ], |
| 47 | ++ exclude: /node_modules/, |
| 48 | ++ plugins: [ |
| 49 | ++ 'annotate-pure-calls', |
| 50 | ++ 'dev-expression', |
| 51 | ++ ['transform-rename-import', { replacements }], |
| 52 | ++ ], |
| 53 | + }; |
| 54 | + function createRollupConfig(format, env, opts) { |
| 55 | +- let shebang; |
| 56 | +- return { |
| 57 | +- // Tell Rollup the entry point to the package |
| 58 | +- input: opts.input, |
| 59 | +- // Tell Rollup which packages to ignore |
| 60 | +- external: utils_1.external, |
| 61 | +- // Establish Rollup output |
| 62 | +- output: { |
| 63 | +- // Set filenames of the consumer's package |
| 64 | +- file: `${constants_1.paths.appDist}/${utils_1.safeVariableName(opts.name)}.${format}.${env}.js`, |
| 65 | +- // Pass through the file format |
| 66 | +- format, |
| 67 | +- // Do not let Rollup call Object.freeze() on namespace import objects |
| 68 | +- // (i.e. import * as namespaceImportObject from...) that are accessed dynamically. |
| 69 | +- freeze: false, |
| 70 | +- // Do not let Rollup add a `__esModule: true` property when generating exports for non-ESM formats. |
| 71 | +- esModule: false, |
| 72 | +- // Rollup has treeshaking by default, but we can optimize it further... |
| 73 | +- treeshake: { |
| 74 | +- // We assume reading a property of an object never has side-effects. |
| 75 | +- // This means tsdx WILL remove getters and setters on objects. |
| 76 | +- // |
| 77 | +- // @example |
| 78 | +- // |
| 79 | +- // const foo = { |
| 80 | +- // get bar() { |
| 81 | +- // console.log('effect'); |
| 82 | +- // return 'bar'; |
| 83 | +- // } |
| 84 | +- // } |
| 85 | +- // |
| 86 | +- // const result = foo.bar; |
| 87 | +- // const illegalAccess = foo.quux.tooDeep; |
| 88 | +- // |
| 89 | +- // Punchline....Don't use getters and setters |
| 90 | +- propertyReadSideEffects: false, |
| 91 | +- }, |
| 92 | +- name: opts.name || utils_1.safeVariableName(opts.name), |
| 93 | +- sourcemap: true, |
| 94 | +- globals: { react: 'React', 'react-native': 'ReactNative' }, |
| 95 | +- exports: 'named', |
| 96 | ++ let shebang; |
| 97 | ++ return { |
| 98 | ++ // Tell Rollup the entry point to the package |
| 99 | ++ input: opts.input, |
| 100 | ++ // Tell Rollup which packages to ignore |
| 101 | ++ external: utils_1.external, |
| 102 | ++ // Establish Rollup output |
| 103 | ++ output: { |
| 104 | ++ // Set filenames of the consumer's package |
| 105 | ++ file: `${constants_1.paths.appDist}/${utils_1.safeVariableName(opts.name)}.${format}.${env}.js`, |
| 106 | ++ // Pass through the file format |
| 107 | ++ format, |
| 108 | ++ // Do not let Rollup call Object.freeze() on namespace import objects |
| 109 | ++ // (i.e. import * as namespaceImportObject from...) that are accessed dynamically. |
| 110 | ++ freeze: false, |
| 111 | ++ // Do not let Rollup add a `__esModule: true` property when generating exports for non-ESM formats. |
| 112 | ++ esModule: false, |
| 113 | ++ // Rollup has treeshaking by default, but we can optimize it further... |
| 114 | ++ treeshake: { |
| 115 | ++ // We assume reading a property of an object never has side-effects. |
| 116 | ++ // This means tsdx WILL remove getters and setters on objects. |
| 117 | ++ // |
| 118 | ++ // @example |
| 119 | ++ // |
| 120 | ++ // const foo = { |
| 121 | ++ // get bar() { |
| 122 | ++ // console.log('effect'); |
| 123 | ++ // return 'bar'; |
| 124 | ++ // } |
| 125 | ++ // } |
| 126 | ++ // |
| 127 | ++ // const result = foo.bar; |
| 128 | ++ // const illegalAccess = foo.quux.tooDeep; |
| 129 | ++ // |
| 130 | ++ // Punchline....Don't use getters and setters |
| 131 | ++ propertyReadSideEffects: false, |
| 132 | ++ }, |
| 133 | ++ name: opts.name || utils_1.safeVariableName(opts.name), |
| 134 | ++ sourcemap: true, |
| 135 | ++ globals: { react: 'React', 'react-native': 'ReactNative' }, |
| 136 | ++ exports: 'named', |
| 137 | ++ }, |
| 138 | ++ plugins: [ |
| 139 | ++ rollup_plugin_node_resolve_1.default({ |
| 140 | ++ module: true, |
| 141 | ++ jsnext: true, |
| 142 | ++ browser: opts.target !== 'node', |
| 143 | ++ }), |
| 144 | ++ format === 'umd' && |
| 145 | ++ rollup_plugin_commonjs_1.default({ |
| 146 | ++ // use a regex to make sure to include eventual hoisted packages |
| 147 | ++ include: /\/node_modules\//, |
| 148 | ++ }), |
| 149 | ++ rollup_plugin_json_1.default(), |
| 150 | ++ rollup_plugin_typescript2_1.default({ |
| 151 | ++ typescript: require('typescript'), |
| 152 | ++ cacheRoot: `./.rts2_cache_${format}`, |
| 153 | ++ tsconfigDefaults: { |
| 154 | ++ compilerOptions: { |
| 155 | ++ sourceMap: true, |
| 156 | ++ declaration: true, |
| 157 | ++ jsx: 'react', |
| 158 | ++ }, |
| 159 | + }, |
| 160 | +- plugins: [ |
| 161 | +- rollup_plugin_node_resolve_1.default({ |
| 162 | +- module: true, |
| 163 | +- jsnext: true, |
| 164 | +- browser: opts.target !== 'node', |
| 165 | +- }), |
| 166 | +- format === 'umd' && |
| 167 | +- rollup_plugin_commonjs_1.default({ |
| 168 | +- // use a regex to make sure to include eventual hoisted packages |
| 169 | +- include: /\/node_modules\//, |
| 170 | +- }), |
| 171 | +- rollup_plugin_json_1.default(), |
| 172 | +- rollup_plugin_typescript2_1.default({ |
| 173 | +- typescript: require('typescript'), |
| 174 | +- cacheRoot: `./.rts2_cache_${format}`, |
| 175 | +- tsconfigDefaults: { |
| 176 | +- compilerOptions: { |
| 177 | +- sourceMap: true, |
| 178 | +- declaration: true, |
| 179 | +- jsx: 'react', |
| 180 | +- }, |
| 181 | +- }, |
| 182 | +- tsconfigOverride: { |
| 183 | +- compilerOptions: { |
| 184 | +- target: 'esnext', |
| 185 | +- }, |
| 186 | +- }, |
| 187 | +- }), |
| 188 | +- rollup_plugin_babel_1.default(babelOptions), |
| 189 | +- rollup_plugin_replace_1.default({ |
| 190 | +- 'process.env.NODE_ENV': JSON.stringify(env), |
| 191 | +- }), |
| 192 | +- rollup_plugin_sourcemaps_1.default(), |
| 193 | +- rollup_plugin_size_snapshot_1.sizeSnapshot({ |
| 194 | +- printInfo: false, |
| 195 | +- }), |
| 196 | +- env === 'production' && |
| 197 | +- rollup_plugin_terser_1.terser({ |
| 198 | +- sourcemap: true, |
| 199 | +- output: { comments: false }, |
9 | 200 | - compress: {
|
10 | 201 | - keep_infinity: true,
|
11 | 202 | - pure_getters: true,
|
12 | 203 | - },
|
13 |
| -+ // compress: { |
14 |
| -+ // keep_infinity: true, |
15 |
| -+ // pure_getters: true, |
16 |
| -+ // }, |
17 |
| -+ compress: false, |
18 |
| - ecma: 5, |
19 |
| - toplevel: format === 'es' || format === 'cjs', |
20 |
| - warnings: true, |
| 204 | +- ecma: 5, |
| 205 | +- toplevel: format === 'es' || format === 'cjs', |
| 206 | +- warnings: true, |
| 207 | +- }), |
| 208 | +- rollup_plugin_preserve_shebang_1.default({ |
| 209 | +- shebang, |
| 210 | +- }), |
| 211 | +- ], |
| 212 | +- }; |
| 213 | ++ tsconfigOverride: { |
| 214 | ++ compilerOptions: { |
| 215 | ++ target: 'esnext', |
| 216 | ++ }, |
| 217 | ++ }, |
| 218 | ++ }), |
| 219 | ++ rollup_plugin_babel_1.default(babelOptions), |
| 220 | ++ rollup_plugin_replace_1.default({ |
| 221 | ++ 'process.env.NODE_ENV': JSON.stringify(env), |
| 222 | ++ }), |
| 223 | ++ rollup_plugin_sourcemaps_1.default(), |
| 224 | ++ rollup_plugin_size_snapshot_1.sizeSnapshot({ |
| 225 | ++ printInfo: false, |
| 226 | ++ }), |
| 227 | ++ env === 'production' && |
| 228 | ++ rollup_plugin_terser_1.terser({ |
| 229 | ++ sourcemap: true, |
| 230 | ++ output: { comments: false }, |
| 231 | ++ compress: false, |
| 232 | ++ ecma: 6, |
| 233 | ++ toplevel: format === 'es' || format === 'cjs', |
| 234 | ++ warnings: true, |
| 235 | ++ }), |
| 236 | ++ rollup_plugin_preserve_shebang_1.default({ |
| 237 | ++ shebang, |
| 238 | ++ }), |
| 239 | ++ ], |
| 240 | ++ }; |
| 241 | + } |
| 242 | + exports.createRollupConfig = createRollupConfig; |
| 243 | +\ No newline at end of file |
0 commit comments