@exodus/stasis 1.0.0-rc.0 → 1.0.0-rc.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.
- package/package.json +3 -3
- package/src/cmd/github-bundle.js +3 -3
- package/src/cmd/output.js +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/stasis",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.1",
|
|
4
4
|
"description": "File-level source bundles and lockfiles",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -118,8 +118,8 @@
|
|
|
118
118
|
"homepage": "https://github.com/PreventiveMeasures/stasis#readme",
|
|
119
119
|
"dependencies": {
|
|
120
120
|
"@exodus/bytes": "^1.16.0",
|
|
121
|
-
"@exodus/stasis-core": "1.0.0-rc.
|
|
122
|
-
"@exodus/stasis-plugins": "1.0.0-rc.
|
|
121
|
+
"@exodus/stasis-core": "1.0.0-rc.1",
|
|
122
|
+
"@exodus/stasis-plugins": "1.0.0-rc.1",
|
|
123
123
|
"@preventive/archive": "^1.4.0",
|
|
124
124
|
"@preventive/deptree": "^1.5.0",
|
|
125
125
|
"@preventive/lockfile": "^1.3.0",
|
package/src/cmd/github-bundle.js
CHANGED
|
@@ -7,7 +7,7 @@ import { createClient } from '@preventive/upstream/github.js'
|
|
|
7
7
|
import { buildGitHubBundle } from '../vfs-bundle/github.js'
|
|
8
8
|
import { debugTimed, heldToLockfile } from './bundle.js'
|
|
9
9
|
import { githubToken, withNpmToken } from './tokens.js'
|
|
10
|
-
import { bundledSummary, heldSummary, lockedSummary, lockfileOnlyError, unpackedSummary,
|
|
10
|
+
import { bundledSummary, heldSummary, lockedSummary, lockfileOnlyError, unpackedSummary, writeBundleOf, writeFile } from './output.js'
|
|
11
11
|
|
|
12
12
|
// The longest file name ext4, APFS and NTFS take: 255 bytes, or characters, ours being ASCII.
|
|
13
13
|
const NAME_MAX = 255
|
|
@@ -54,8 +54,8 @@ export async function githubBundleCommand({ cwd = process.cwd(), env = process.e
|
|
|
54
54
|
const lockData = writes ? built.lockfile.serialize() : undefined
|
|
55
55
|
let dest
|
|
56
56
|
// Serialized under --lockfile-only too: never write a lockfile of a bundle that couldn't be written.
|
|
57
|
-
if (lockfileOnly) bundle.
|
|
58
|
-
else dest = await debugTimed('Wrote the bundle', () =>
|
|
57
|
+
if (lockfileOnly) bundle.serializedBytes()
|
|
58
|
+
else dest = await debugTimed('Wrote the bundle', () => writeBundleOf(cwd, output ?? named(BUNDLE_FILE), bundle, brotliQuality))
|
|
59
59
|
if (lockData !== undefined) writeFile(lockAbs, lockData)
|
|
60
60
|
const from = `${options.github}@${bundle.repo.commit}${directory ? `/${directory}` : ''}`
|
|
61
61
|
const summarized = (summary, to) => summary(bundle.sources.size, bundle.modules, from, to)
|
package/src/cmd/output.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mkdirSync, writeFileSync } from 'node:fs'
|
|
2
2
|
import { dirname, resolve } from 'node:path'
|
|
3
3
|
|
|
4
|
-
import { compressBundleText } from '@exodus/stasis-core/brotli'
|
|
4
|
+
import { compressBundle, compressBundleText } from '@exodus/stasis-core/brotli'
|
|
5
5
|
|
|
6
6
|
export function writeFile(abs, data) {
|
|
7
7
|
mkdirSync(dirname(abs), { recursive: true })
|
|
@@ -19,6 +19,7 @@ export function writeOutput(cwd, target, data) {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export const writeBundle = (cwd, target, serialized, brotliQuality) => writeOutput(cwd, target, compressBundleText(serialized, brotliQuality))
|
|
22
|
+
export const writeBundleOf = (cwd, target, bundle, brotliQuality) => writeOutput(cwd, target, compressBundle(bundle, brotliQuality))
|
|
22
23
|
|
|
23
24
|
// `N package(s)`: the non-empty buckets of `modules`, the "." workspace bucket one of them.
|
|
24
25
|
export function packagesLabel(modules) {
|