houdini-react 2.0.0-go.10 → 2.0.0-go.12
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/bin/houdini-react +5 -1
- package/package.json +7 -7
- package/postInstall.js +4 -2
package/bin/houdini-react
CHANGED
|
@@ -57,7 +57,11 @@ function getBinaryPath() {
|
|
|
57
57
|
|
|
58
58
|
try {
|
|
59
59
|
const pnpmEntries = fs.readdirSync(pnpmDir)
|
|
60
|
-
|
|
60
|
+
// Get the expected version from the main package
|
|
61
|
+
const packageJSON = require(path.join(__dirname, '..', 'package.json'))
|
|
62
|
+
const expectedVersion = packageJSON.version
|
|
63
|
+
const expectedPnpmEntry = `${platformSpecificPackageName}@${expectedVersion}`
|
|
64
|
+
const platformEntry = pnpmEntries.find(entry => entry === expectedPnpmEntry)
|
|
61
65
|
|
|
62
66
|
if (platformEntry) {
|
|
63
67
|
const pnpmBinaryPath = path.join(pnpmDir, platformEntry, 'node_modules', platformSpecificPackageName, 'bin', binaryName)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "houdini-react",
|
|
3
|
-
"version": "2.0.0-go.
|
|
3
|
+
"version": "2.0.0-go.12",
|
|
4
4
|
"description": "The React plugin for houdini",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -79,12 +79,12 @@
|
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
"optionalDependencies": {
|
|
82
|
-
"houdini-react-darwin-x64": "2.0.0-go.
|
|
83
|
-
"houdini-react-darwin-arm64": "2.0.0-go.
|
|
84
|
-
"houdini-react-linux-x64": "2.0.0-go.
|
|
85
|
-
"houdini-react-linux-arm64": "2.0.0-go.
|
|
86
|
-
"houdini-react-win32-x64": "2.0.0-go.
|
|
87
|
-
"houdini-react-win32-arm64": "2.0.0-go.
|
|
82
|
+
"houdini-react-darwin-x64": "2.0.0-go.12",
|
|
83
|
+
"houdini-react-darwin-arm64": "2.0.0-go.12",
|
|
84
|
+
"houdini-react-linux-x64": "2.0.0-go.12",
|
|
85
|
+
"houdini-react-linux-arm64": "2.0.0-go.12",
|
|
86
|
+
"houdini-react-win32-x64": "2.0.0-go.12",
|
|
87
|
+
"houdini-react-win32-arm64": "2.0.0-go.12"
|
|
88
88
|
},
|
|
89
89
|
"bin": "bin/houdini-react",
|
|
90
90
|
"scripts": {
|
package/postInstall.js
CHANGED
|
@@ -5,7 +5,7 @@ const https = require('https')
|
|
|
5
5
|
const child_process = require('child_process')
|
|
6
6
|
|
|
7
7
|
// Adjust the version you want to install. You can also make this dynamic.
|
|
8
|
-
const BINARY_DISTRIBUTION_VERSION = '2.0.0-go.
|
|
8
|
+
const BINARY_DISTRIBUTION_VERSION = '2.0.0-go.12'
|
|
9
9
|
|
|
10
10
|
// Windows binaries end with .exe so we need to special case them.
|
|
11
11
|
const binaryName = process.platform === 'win32' ? 'houdini-react.exe' : 'houdini-react'
|
|
@@ -208,7 +208,9 @@ function maybeOptimizePackage() {
|
|
|
208
208
|
|
|
209
209
|
try {
|
|
210
210
|
const pnpmEntries = fs.readdirSync(pnpmDir)
|
|
211
|
-
|
|
211
|
+
// Look for the specific version that matches BINARY_DISTRIBUTION_VERSION
|
|
212
|
+
const expectedPnpmEntry = `${platformSpecificPackageName}@${BINARY_DISTRIBUTION_VERSION}`
|
|
213
|
+
const platformEntry = pnpmEntries.find(entry => entry === expectedPnpmEntry)
|
|
212
214
|
|
|
213
215
|
if (platformEntry) {
|
|
214
216
|
binaryPath = path.join(pnpmDir, platformEntry, 'node_modules', platformSpecificPackageName, 'bin', binaryName)
|