npm-pkgbuild 7.8.0 → 7.8.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/package.json +1 -1
  2. package/src/util.mjs +5 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-pkgbuild",
3
- "version": "7.8.0",
3
+ "version": "7.8.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/util.mjs CHANGED
@@ -91,7 +91,10 @@ export async function extractFromPackage(pkg, dir) {
91
91
  return { properties, sources, dependencies, output };
92
92
  }
93
93
 
94
- export function createExpressionTransformer(properties) {
94
+ export function createExpressionTransformer(
95
+ properties,
96
+ match = entry => entry.name.match(/\.(conf|json)$/)
97
+ ) {
95
98
  async function* transformer(expression, remainder, source, cb) {
96
99
  const value = properties[expression];
97
100
  console.log("EXPRESSION", expression, value);
@@ -99,7 +102,7 @@ export function createExpressionTransformer(properties) {
99
102
  }
100
103
 
101
104
  return {
102
- match: entry => true, //entry.name.match(/(conf|json)$/),
105
+ match,
103
106
  transform: async entry =>
104
107
  new ReadableStreamContentEntry(
105
108
  entry.name,