@salesforce/plugin-release-management 4.1.18-qa.0 → 4.1.19
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/lib/commands/cli/tarballs/prepare.js +18 -31
- package/lib/commands/cli/tarballs/prepare.js.map +1 -1
- package/npm-shrinkwrap.json +913 -633
- package/oclif.manifest.json +1 -1
- package/package.json +14 -14
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
const promises_1 = require("node:fs/promises");
|
|
10
9
|
const fg = require("fast-glob");
|
|
11
10
|
const shelljs_1 = require("shelljs");
|
|
12
11
|
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
@@ -25,41 +24,27 @@ class Prepare extends sf_plugins_core_1.SfCommand {
|
|
|
25
24
|
const baseDirGlob = `${workingDir}/node_modules`;
|
|
26
25
|
// Remove JSforceTestSuite from dist
|
|
27
26
|
const jsForceTestSuite = await find(`${baseDirGlob}/JSforceTestSuite`, { onlyDirectories: true });
|
|
28
|
-
|
|
29
|
-
await this.remove(await find(`${baseDirGlob}/jsforce/src`), 'jsforce src');
|
|
30
|
-
await this.remove(await find(`${baseDirGlob}/jsforce/browser`), 'jsforce browser');
|
|
31
|
-
// salesforce plugin schemas
|
|
32
|
-
await this.remove(await find(`${baseDirGlob}/@salesforce/plugin-*/schemas`), 'plugin schema files');
|
|
33
|
-
// isogit cleanup
|
|
34
|
-
await this.remove(await find(`${baseDirGlob}/**/.size_report.html`), 'isogit size results');
|
|
35
|
-
// minified js
|
|
36
|
-
await this.remove(await find(`${baseDirGlob}/**/*.min.js`), 'minified js');
|
|
37
|
-
await this.remove(await find(`${baseDirGlob}/rxjs/src`), 'rxjs src');
|
|
38
|
-
await this.remove(await find(`${baseDirGlob}/**/ajv/lib`), 'ajv lib');
|
|
39
|
-
await this.remove(await find(`${baseDirGlob}/**/jszip/lib`), 'jszip lib');
|
|
27
|
+
this.remove(jsForceTestSuite, 'JSforceTestSuite files');
|
|
40
28
|
// Module readmes and other markdown docs not found in template directories
|
|
41
|
-
const markdownFiles = await find(`${baseDirGlob}
|
|
29
|
+
const markdownFiles = await find(`${baseDirGlob}/**/*.md`, {
|
|
42
30
|
excludeDirectories: ['templates', 'messages'],
|
|
43
31
|
});
|
|
44
|
-
|
|
32
|
+
this.remove(markdownFiles, '.md files');
|
|
45
33
|
// Module .gitignore not found in template directories
|
|
46
34
|
const gitignore = await find(`${baseDirGlob}/**/.gitignore`, { excludeDirectories: ['templates'] });
|
|
47
|
-
|
|
35
|
+
this.remove(gitignore, '.gitignore files');
|
|
48
36
|
// Module .gitattributes not found in template directories
|
|
49
37
|
const gitattributes = await find(`${baseDirGlob}/**/.gitattributes`, { excludeDirectories: ['templates'] });
|
|
50
|
-
|
|
38
|
+
this.remove(gitattributes, '.gitattributes files');
|
|
51
39
|
// Module .eslintrc not found in template directories
|
|
52
40
|
const eslintrc = await find(`${baseDirGlob}/**/.eslintrc`, { excludeDirectories: ['templates'] });
|
|
53
|
-
|
|
41
|
+
this.remove(eslintrc, '.eslintrc files');
|
|
54
42
|
// Module appveyor.yml not found in template directories
|
|
55
43
|
const appveyor = await find(`${baseDirGlob}/**/appveyor.yml`, { excludeDirectories: ['templates'] });
|
|
56
|
-
|
|
44
|
+
this.remove(appveyor, 'appveyor.yml files');
|
|
57
45
|
// Module circle.yml not found in template directories
|
|
58
46
|
const circle = await find(`${baseDirGlob}/**/circle.yml`, { excludeDirectories: ['templates'] });
|
|
59
|
-
|
|
60
|
-
// svg graphs
|
|
61
|
-
const graphs = await find(`${baseDirGlob}/**/graph.svg`);
|
|
62
|
-
await this.remove(graphs, 'svg graphs');
|
|
47
|
+
this.remove(circle, 'circle.yml files');
|
|
63
48
|
// Module test dirs, except in salesforce-alm, which includes production source code in such a dir
|
|
64
49
|
const allowedTestDirs = [
|
|
65
50
|
'command',
|
|
@@ -71,27 +56,27 @@ class Prepare extends sf_plugins_core_1.SfCommand {
|
|
|
71
56
|
'@salesforce/plugin-generator',
|
|
72
57
|
];
|
|
73
58
|
const testDirs = (await find(`${baseDirGlob}/**/test`, { onlyDirectories: true })).filter((f) => !allowedTestDirs.some((d) => f.includes(d)));
|
|
74
|
-
|
|
59
|
+
this.remove(testDirs, 'test directories');
|
|
75
60
|
// JS map files, except the ill-named `lodash.map` (it's a directory and we'll also filter out matches if found for good measure)
|
|
76
61
|
const maps = (await find(`${baseDirGlob}/**/*.map`)).filter((f) => !f.includes('lodash.map'));
|
|
77
|
-
|
|
62
|
+
this.remove(maps, '*.map files');
|
|
78
63
|
// In case yarn autoclean is disabled, delete some known windows file path length offenders
|
|
79
64
|
const nycOutput = await find(`${baseDirGlob}/**/.nyc_output`);
|
|
80
|
-
|
|
65
|
+
this.remove(nycOutput, '.nyc_output files');
|
|
81
66
|
// Large files shipped with jsforce
|
|
82
67
|
const jsforceBuild = await find(`${baseDirGlob}/jsforce/build`, { onlyDirectories: true });
|
|
83
|
-
|
|
68
|
+
this.remove(jsforceBuild, 'jsforce/build directory');
|
|
84
69
|
// This breaks compilation. We need to probably do this right before the pack, but then this will
|
|
85
70
|
// break compilation the next time compile is ran without doing a yarn install --force
|
|
86
71
|
// We don't need types in the production code
|
|
87
72
|
if (this.flags.types) {
|
|
88
73
|
const types = await find(`${baseDirGlob}/**/*.d.ts`);
|
|
89
|
-
|
|
74
|
+
this.remove(types, '*.d.ts files');
|
|
90
75
|
}
|
|
91
76
|
}
|
|
92
|
-
|
|
77
|
+
remove(files, type) {
|
|
93
78
|
if (!files.length)
|
|
94
|
-
return
|
|
79
|
+
return;
|
|
95
80
|
const msg = this.flags.dryrun
|
|
96
81
|
? `${chalk_1.red.bold('[DRYRUN] Removing:')} ${files.length} ${type}`
|
|
97
82
|
: `${chalk_1.red.bold('Removing:')} ${files.length} ${type}`;
|
|
@@ -99,7 +84,9 @@ class Prepare extends sf_plugins_core_1.SfCommand {
|
|
|
99
84
|
if (this.flags.verbose) {
|
|
100
85
|
files.forEach((f) => this.log(` ${f}`));
|
|
101
86
|
}
|
|
102
|
-
|
|
87
|
+
if (!this.flags.dryrun) {
|
|
88
|
+
files.forEach((f) => (0, shelljs_1.rm)('-rf', f));
|
|
89
|
+
}
|
|
103
90
|
}
|
|
104
91
|
}
|
|
105
92
|
Prepare.summary = messages.getMessage('description');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare.js","sourceRoot":"","sources":["../../../../src/commands/cli/tarballs/prepare.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH
|
|
1
|
+
{"version":3,"file":"prepare.js","sourceRoot":"","sources":["../../../../src/commands/cli/tarballs/prepare.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,gCAAgC;AAChC,qCAAkC;AAClC,iEAA+D;AAC/D,2CAA4C;AAC5C,iCAA4B;AAG5B,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,uCAAuC,EAAE,sBAAsB,CAAC,CAAC;AAExG;;GAEG;AACH,MAAqB,OAAQ,SAAQ,2BAAe;IAuB3C,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC5C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,MAAM,UAAU,GAAG,IAAA,aAAG,GAAE,CAAC,MAAM,CAAC;QAChC,MAAM,WAAW,GAAG,GAAG,UAAU,eAAe,CAAC;QAEjD,oCAAoC;QACpC,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC,GAAG,WAAW,mBAAmB,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC,CAAC;QAClG,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,w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