prepare-package 1.2.4 → 1.2.6
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.
- package/dist/index.js +23 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -76,6 +76,28 @@ module.exports = async function (options) {
|
|
|
76
76
|
});
|
|
77
77
|
throw new Error('Publishing blocked: Remove local file dependencies before publishing to npm');
|
|
78
78
|
}
|
|
79
|
+
|
|
80
|
+
// Clean up files that should never be published (search recursively, exclude node_modules)
|
|
81
|
+
const filesToRemove = [
|
|
82
|
+
'firebase-debug.log',
|
|
83
|
+
'.DS_Store',
|
|
84
|
+
'Thumbs.db',
|
|
85
|
+
'.env',
|
|
86
|
+
'.env.local',
|
|
87
|
+
'.env.development',
|
|
88
|
+
'.env.production',
|
|
89
|
+
];
|
|
90
|
+
|
|
91
|
+
filesToRemove.forEach(fileName => {
|
|
92
|
+
const foundFiles = jetpack.find(options.cwd, {
|
|
93
|
+
matching: [`**/${fileName}`, `!node_modules/**`],
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
foundFiles.forEach(filePath => {
|
|
97
|
+
jetpack.remove(filePath);
|
|
98
|
+
logger.log(chalk.yellow(`Removed ${path.relative(options.cwd, filePath)}`));
|
|
99
|
+
});
|
|
100
|
+
});
|
|
79
101
|
}
|
|
80
102
|
|
|
81
103
|
// const options = {
|
|
@@ -200,7 +222,7 @@ module.exports = async function (options) {
|
|
|
200
222
|
})
|
|
201
223
|
.then((r) => {
|
|
202
224
|
// console.log(chalk.green(`[prepare-package]: Purged ${theirPackageJSON.name}`));
|
|
203
|
-
logger.log(chalk.green(`Purged ${theirPackageJSON.name}
|
|
225
|
+
logger.log(chalk.green(`Purged ${theirPackageJSON.name}: status=${r.status}, id=${r.id}, timestamp=${r.timestamp}`));
|
|
204
226
|
})
|
|
205
227
|
.catch((e) => {
|
|
206
228
|
// console.log(chalk.red(`[prepare-package]: Failed to purge ${theirPackageJSON.name}`, e));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prepare-package",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
4
4
|
"description": "Prepare a Node.js package before being published",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"chalk": "^4.1.2",
|
|
43
43
|
"chokidar": "^4.0.3",
|
|
44
44
|
"fs-jetpack": "^5.1.0",
|
|
45
|
-
"wonderful-fetch": "^1.3.
|
|
45
|
+
"wonderful-fetch": "^1.3.4"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"mocha": "^8.4.0"
|