@crombolo/transfer 0.12.1 → 0.13.2
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/package.ts +10 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crombolo/transfer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.2",
|
|
4
4
|
"description": "Content transfer for crombolo: bundles of content moved between environments.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Crombolo",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@crombolo/core": "0.
|
|
32
|
-
"@crombolo/data": "0.
|
|
31
|
+
"@crombolo/core": "0.13.2",
|
|
32
|
+
"@crombolo/data": "0.13.2"
|
|
33
33
|
}
|
|
34
34
|
}
|
package/src/package.ts
CHANGED
|
@@ -42,6 +42,16 @@ const slug = (text: string): string =>
|
|
|
42
42
|
.replace(/[^a-z0-9]+/g, '-')
|
|
43
43
|
.replace(/^-+|-+$/g, '')
|
|
44
44
|
|
|
45
|
+
/**
|
|
46
|
+
* The core versions a bundle crombolo writes can be installed on: this release
|
|
47
|
+
* or any later one. A newer node reads every older bundle format, so a later
|
|
48
|
+
* release is never a reason to refuse one; an older node is turned away here,
|
|
49
|
+
* by name, before it meets a format it cannot read. Not `^`: before 1.0 a caret
|
|
50
|
+
* pins the minor, and an environment one minor ahead would refuse its own
|
|
51
|
+
* preview's export.
|
|
52
|
+
*/
|
|
53
|
+
export const bundlePeerRange = (coreVersion: string): string => `>=${coreVersion}`
|
|
54
|
+
|
|
45
55
|
/** A name npm would accept. */
|
|
46
56
|
export function isPackageName(name: string): boolean {
|
|
47
57
|
return NPM_NAME.test(name) && name.length <= 214
|