pkgbld 1.9.0 → 1.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +3 -10
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -138,18 +138,11 @@ function getBuildPlugins(format, config, inputs, currentInput) {
138
138
  typescript()
139
139
  ];
140
140
  if (config.preprocess.length) {
141
- result.unshift(preprocess({ include: config.preprocess.map(name => `${config.sourceDir}/${name}.ts`), context: getPreprocessContext(format) }));
141
+ const context = { [format == 'es' ? 'esm' : 'cjs']: true };
142
+ result.unshift(preprocess({ include: config.preprocess.map(name => `${config.sourceDir}/${name}.ts`), context }));
142
143
  }
143
144
  return result;
144
145
  }
145
- function getPreprocessContext(format) {
146
- if (format == 'es') {
147
- return { esm: true };
148
- }
149
- else {
150
- return { cjs: true };
151
- }
152
- }
153
146
  function getOutputPlugins(format, config) {
154
147
  return config.compressTargets.includes(format) ? [rollupPluginTerser.terser({
155
148
  mangle: {
@@ -204,7 +197,7 @@ function getRollupConfigs(inputs, config, helpers) {
204
197
  },
205
198
  plugins: getBuildPlugins('umd', config, inputs, currentInput)
206
199
  }));
207
- if (umdConfigs && umdConfigs.length) {
200
+ if (umdConfigs.length) {
208
201
  configs.push(...umdConfigs);
209
202
  }
210
203
  return configs;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.9.0",
2
+ "version": "1.9.1",
3
3
  "license": "MIT",
4
4
  "name": "pkgbld",
5
5
  "author": {
@@ -45,13 +45,13 @@
45
45
  "conventional-changelog-angular": "5.0.13",
46
46
  "eslint": "8.26.0",
47
47
  "semantic-release": "19.0.5",
48
- "@rollup-extras/plugin-binify": "1.1.2"
48
+ "@rollup-extras/plugin-binify": "1.1.3"
49
49
  },
50
50
  "dependencies": {
51
- "@niceties/logger": "1.1.6",
52
- "@niceties/draftlog-appender": "1.2.5",
51
+ "@niceties/logger": "1.1.9",
52
+ "@niceties/draftlog-appender": "1.2.6",
53
53
  "lodash": "4.17.21",
54
- "rollup": "3.2.3",
54
+ "rollup": "3.2.5",
55
55
  "rollup-plugin-terser": "7.0.2",
56
56
  "rollup-plugin-typescript2": "0.34.1",
57
57
  "rollup-plugin-preprocess": "0.0.4",
@@ -64,7 +64,7 @@
64
64
  },
65
65
  "overrides": {
66
66
  "rollup-plugin-terser@7.0.2": {
67
- "rollup": "3.2.3"
67
+ "rollup": "3.2.5"
68
68
  }
69
69
  }
70
70
  }