@pnpm/pnpr 0.0.0-26070201 → 0.1.0-alpha.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/CHANGELOG.md +20 -0
- package/install.js +24 -0
- package/package.json +12 -12
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# @pnpm/pnpr
|
|
2
|
+
|
|
3
|
+
## 0.1.0-alpha.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Bump version.
|
|
8
|
+
|
|
9
|
+
## 0.1.0-alpha.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- On publish, the README of the `latest` version is now hoisted to the packument's top-level `readme` (and `readmeFilename`) field, matching npm and verdaccio. Publish clients only send the readme inside the version manifest, so without this a package published to pnpr exposed no top-level readme for full-packument consumers and registry UIs to render.
|
|
14
|
+
|
|
15
|
+
## 0.1.0-alpha.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- `@pnpm/pnpr` is now versioned with changesets and released from the unified release workflow. Versions switch from the `0.0.0-<datestamp>` scheme to semver, starting the 0.1.0 prerelease line at 0.1.0-alpha.0.
|
|
20
|
+
- The install script exits without error in the pnpm monorepo checkout, where the per-platform binary packages are not generated.
|
package/install.js
CHANGED
|
@@ -44,6 +44,13 @@ const PLATFORMS = {
|
|
|
44
44
|
setup()
|
|
45
45
|
|
|
46
46
|
function setup () {
|
|
47
|
+
// The committed manifest has no `optionalDependencies`; generate-packages.mjs
|
|
48
|
+
// adds them at release time. Without them this is the monorepo checkout, where
|
|
49
|
+
// the wrapper is a workspace package and there is no native binary to link.
|
|
50
|
+
if (readOwnManifest().optionalDependencies == null) {
|
|
51
|
+
return
|
|
52
|
+
}
|
|
53
|
+
|
|
47
54
|
const candidates = getBinCandidates()
|
|
48
55
|
if (candidates.length === 0) {
|
|
49
56
|
fail(`@pnpm/pnpr does not ship a prebuilt binary for ${platform}-${arch}.`)
|
|
@@ -142,6 +149,23 @@ function fail (message) {
|
|
|
142
149
|
process.exit(1)
|
|
143
150
|
}
|
|
144
151
|
|
|
152
|
+
// A successful read with no optionalDependencies is the dev checkout (setup
|
|
153
|
+
// no-ops there); a read/parse failure is a corrupt published package and must
|
|
154
|
+
// not be silently swallowed into that same no-op path.
|
|
155
|
+
function readOwnManifest () {
|
|
156
|
+
const manifestPath = path.join(ownDir, 'package.json')
|
|
157
|
+
let manifest
|
|
158
|
+
try {
|
|
159
|
+
manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'))
|
|
160
|
+
} catch (err) {
|
|
161
|
+
throw new Error(`Failed to read ${manifestPath}: ${err.message}`)
|
|
162
|
+
}
|
|
163
|
+
if (typeof manifest !== 'object' || manifest == null || Array.isArray(manifest)) {
|
|
164
|
+
throw new Error(`Expected ${manifestPath} to contain a JSON object`)
|
|
165
|
+
}
|
|
166
|
+
return manifest
|
|
167
|
+
}
|
|
168
|
+
|
|
145
169
|
/**
|
|
146
170
|
* Native binary specifiers to try, most-preferred first; empty when the host is
|
|
147
171
|
* unsupported. The linux glibc/musl pair is ordered by detected libc, which
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/pnpr",
|
|
3
|
+
"version": "0.1.0-alpha.2",
|
|
3
4
|
"description": "pnpm-compatible npm registry server, written in Rust",
|
|
4
5
|
"keywords": [
|
|
5
6
|
"pnpm",
|
|
@@ -14,6 +15,9 @@
|
|
|
14
15
|
"url": "https://github.com/pnpm/pnpm",
|
|
15
16
|
"directory": "pnpr/npm/pnpr"
|
|
16
17
|
},
|
|
18
|
+
"bin": {
|
|
19
|
+
"pnpr": "bin/pnpr"
|
|
20
|
+
},
|
|
17
21
|
"type": "module",
|
|
18
22
|
"engines": {
|
|
19
23
|
"node": ">=18.*"
|
|
@@ -23,21 +27,17 @@
|
|
|
23
27
|
"install.js",
|
|
24
28
|
"LICENSE.md"
|
|
25
29
|
],
|
|
26
|
-
"version": "0.0.0-26070201",
|
|
27
30
|
"optionalDependencies": {
|
|
28
|
-
"@pnpm/pnpr.win32-x64": "0.
|
|
29
|
-
"@pnpm/pnpr.win32-arm64": "0.
|
|
30
|
-
"@pnpm/pnpr.darwin-x64": "0.
|
|
31
|
-
"@pnpm/pnpr.darwin-arm64": "0.
|
|
32
|
-
"@pnpm/pnpr.linux-x64": "0.
|
|
33
|
-
"@pnpm/pnpr.linux-arm64": "0.
|
|
34
|
-
"@pnpm/pnpr.linux-x64-musl": "0.
|
|
35
|
-
"@pnpm/pnpr.linux-arm64-musl": "0.
|
|
31
|
+
"@pnpm/pnpr.win32-x64": "0.1.0-alpha.2",
|
|
32
|
+
"@pnpm/pnpr.win32-arm64": "0.1.0-alpha.2",
|
|
33
|
+
"@pnpm/pnpr.darwin-x64": "0.1.0-alpha.2",
|
|
34
|
+
"@pnpm/pnpr.darwin-arm64": "0.1.0-alpha.2",
|
|
35
|
+
"@pnpm/pnpr.linux-x64": "0.1.0-alpha.2",
|
|
36
|
+
"@pnpm/pnpr.linux-arm64": "0.1.0-alpha.2",
|
|
37
|
+
"@pnpm/pnpr.linux-x64-musl": "0.1.0-alpha.2",
|
|
38
|
+
"@pnpm/pnpr.linux-arm64-musl": "0.1.0-alpha.2"
|
|
36
39
|
},
|
|
37
40
|
"scripts": {
|
|
38
41
|
"preinstall": "node install.js"
|
|
39
|
-
},
|
|
40
|
-
"bin": {
|
|
41
|
-
"pnpr": "bin/pnpr"
|
|
42
42
|
}
|
|
43
43
|
}
|