@travetto/pack 7.0.4 → 7.1.0
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/README.md +1 -1
- package/package.json +4 -4
- package/support/bin/operation.ts +1 -1
- package/support/pack.base.ts +2 -2
- package/support/rollup/config.ts +2 -2
package/README.md
CHANGED
|
@@ -82,7 +82,7 @@ Every [Pack](https://github.com/travetto/travetto/tree/main/module/pack#readme "
|
|
|
82
82
|
* `writeEntryScript` - Create the entry script based on the `--entry-command`, `args`
|
|
83
83
|
* `copyResources` - Will pull in local `resources/**` files into the final output
|
|
84
84
|
* `primeAppCache` - Runs `trv run` to ensure the appropriate files are generated to allow for running the application. This only applies if the entry point is equivalent to `trv run`
|
|
85
|
-
* `writeManifest` - Produces the `
|
|
85
|
+
* `writeManifest` - Produces the `production`-ready manifest that is used at runtime. Removes all devDependencies from the manifest.json
|
|
86
86
|
* `bundle` - Invokes [Rollup](https://rollupjs.org/) with the appropriate file set to produce a single output .js file. Depending on the module type ([CommonJS](https://nodejs.org/api/modules.html) or [Ecmascript Module](https://nodejs.org/api/esm.html)) the build process differs to handle the dynamic loading that application does at runtime.
|
|
87
87
|
|
|
88
88
|
## CLI - pack:zip
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/pack",
|
|
3
|
-
"version": "7.0
|
|
3
|
+
"version": "7.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Code packing utilities",
|
|
6
6
|
"keywords": [
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"@rollup/plugin-json": "^6.1.0",
|
|
31
31
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
32
32
|
"@rollup/plugin-terser": "^0.4.4",
|
|
33
|
-
"@travetto/runtime": "^7.0
|
|
34
|
-
"@travetto/terminal": "^7.0
|
|
33
|
+
"@travetto/runtime": "^7.1.0",
|
|
34
|
+
"@travetto/terminal": "^7.1.0",
|
|
35
35
|
"rollup": "^4.55.1"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@travetto/cli": "^7.0
|
|
38
|
+
"@travetto/cli": "^7.1.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependenciesMeta": {
|
|
41
41
|
"@travetto/cli": {
|
package/support/bin/operation.ts
CHANGED
|
@@ -221,7 +221,7 @@ export class PackOperation {
|
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
/**
|
|
224
|
-
* Produce the output manifest, only including
|
|
224
|
+
* Produce the output manifest, only including production dependencies
|
|
225
225
|
*/
|
|
226
226
|
static async * writeManifest(config: CommonPackConfig): AsyncIterable<string[]> {
|
|
227
227
|
const out = path.resolve(config.buildDirectory, config.manifestFile);
|
package/support/pack.base.ts
CHANGED
|
@@ -17,7 +17,7 @@ export abstract class BasePackCommand implements CliCommandShape {
|
|
|
17
17
|
|
|
18
18
|
static get entryPoints(): string[] {
|
|
19
19
|
return RuntimeIndex.find({
|
|
20
|
-
module: module => module.
|
|
20
|
+
module: module => module.production,
|
|
21
21
|
folder: folder => folder === 'support',
|
|
22
22
|
file: file => file.sourceFile.includes('entry.')
|
|
23
23
|
})
|
|
@@ -130,7 +130,7 @@ export abstract class BasePackCommand implements CliCommandShape {
|
|
|
130
130
|
return [...RuntimeIndex.getModuleList('all')]
|
|
131
131
|
.map(name => RuntimeIndex.getModule(name))
|
|
132
132
|
.filter(module => !!module)
|
|
133
|
-
.filter(module => module.
|
|
133
|
+
.filter(module => module.production)
|
|
134
134
|
.map(module => PackageUtil.readPackage(module?.sourcePath))
|
|
135
135
|
.map(pkg => pkg?.travetto?.build?.binaryDependencies ?? [])
|
|
136
136
|
.flat();
|
package/support/rollup/config.ts
CHANGED
|
@@ -43,7 +43,7 @@ export function getEntry(): string {
|
|
|
43
43
|
export function getFiles(entry?: string): string[] {
|
|
44
44
|
return [...RuntimeIndex.getModuleList('all')]
|
|
45
45
|
.map(name => RuntimeIndex.getManifestModule(name))
|
|
46
|
-
.filter(module => module.
|
|
46
|
+
.filter(module => module.production)
|
|
47
47
|
.flatMap(getFilesFromModule)
|
|
48
48
|
.filter(file => (!entry || !file.endsWith(entry)) && !file.includes('@travetto/pack/support/'));
|
|
49
49
|
}
|
|
@@ -51,7 +51,7 @@ export function getFiles(entry?: string): string[] {
|
|
|
51
51
|
export function getIgnoredModules(): ManifestModule[] {
|
|
52
52
|
return [...RuntimeIndex.getModuleList('all')]
|
|
53
53
|
.map(name => RuntimeIndex.getManifestModule(name))
|
|
54
|
-
.filter(module => !module.
|
|
54
|
+
.filter(module => !module.production);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
export function getMinifyConfig(): Parameters<typeof terser>[0] {
|