pinokiod 7.5.4 → 7.5.6

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.
@@ -1,28 +1,10 @@
1
1
  const semver = require('semver')
2
2
 
3
3
  const CONDA_PIN_VERSION = "26.3.2"
4
- const DEFAULT_SQLITE_PIN_VERSION = "3.47.2"
5
- const WINDOWS_SQLITE_PIN_VERSION = "3.53.2"
6
4
  const PYTHON_PIN_VERSION = "3.10.20"
7
5
  const PYTHON_INSTALL_SPEC = `python=${PYTHON_PIN_VERSION}`
8
6
  const WINDOWS_PYTHON_SSL_FIX_SPEC = `${PYTHON_INSTALL_SPEC}=*_1_cpython`
9
7
 
10
- const sqlitePinVersion = (platform) => {
11
- return platform === "win32" ? WINDOWS_SQLITE_PIN_VERSION : DEFAULT_SQLITE_PIN_VERSION
12
- }
13
-
14
- const sqliteInstallSpec = (platform) => {
15
- return `sqlite=${sqlitePinVersion(platform)}`
16
- }
17
-
18
- const sqlitePinnedSpec = (platform) => {
19
- return `sqlite ==${sqlitePinVersion(platform)}`
20
- }
21
-
22
- const isExpectedSqlitePinned = (platform, version) => {
23
- return String(version) === sqlitePinVersion(platform)
24
- }
25
-
26
8
  const condaBuildNumber = (build) => {
27
9
  const chunks = String(build || "").split("_").reverse()
28
10
  const buildNumber = chunks.find((chunk) => /^\d+$/.test(chunk))
@@ -48,8 +30,5 @@ module.exports = {
48
30
  CONDA_PIN_VERSION,
49
31
  PYTHON_INSTALL_SPEC,
50
32
  WINDOWS_PYTHON_SSL_FIX_SPEC,
51
- isExpectedSqlitePinned,
52
33
  isExpectedPythonPinned,
53
- sqliteInstallSpec,
54
- sqlitePinnedSpec,
55
34
  }
@@ -8,9 +8,6 @@ const {
8
8
  PYTHON_INSTALL_SPEC,
9
9
  WINDOWS_PYTHON_SSL_FIX_SPEC,
10
10
  isExpectedPythonPinned,
11
- isExpectedSqlitePinned,
12
- sqliteInstallSpec,
13
- sqlitePinnedSpec,
14
11
  } = require('./conda-pins')
15
12
 
16
13
  const MINIFORGE_RELEASE = "26.3.2-3"
@@ -46,7 +43,6 @@ class Conda {
46
43
  pinnedPackages() {
47
44
  return [
48
45
  `conda ==${CONDA_PIN_VERSION}`,
49
- sqlitePinnedSpec(this.kernel.platform),
50
46
  ].join("\n")
51
47
  }
52
48
  async hasCondaMeta() {
@@ -161,22 +157,6 @@ report_errors: false`)
161
157
  }
162
158
  }
163
159
 
164
- // Use sqlite to check if `conda update -y --all` went through successfully
165
- // sometimes it just fails silently so need to check
166
- if (name === "sqlite") {
167
- if (isExpectedSqlitePinned(this.kernel.platform, version)) {
168
- conda_check.sqlite = true
169
- }
170
- //let coerced = semver.coerce(version)
171
- //let sqlite_requirement = ">=3.47.2"
172
- //if (semver.satisfies(coerced, sqlite_requirement)) {
173
- // console.log("semver satisfied")
174
-
175
- // conda_check.sqlite = true
176
- //} else {
177
- // console.log("semver NOT satisfied")
178
- //}
179
- }
180
160
  if (name === "python") {
181
161
  conda_check.python = isExpectedPythonPinned(this.kernel.platform, version, build)
182
162
  }
@@ -190,7 +170,7 @@ report_errors: false`)
190
170
  this.kernel.bin.installed.conda = conda
191
171
  this.kernel.bin.installed.conda_versions = conda_versions
192
172
  this.kernel.bin.installed.conda_builds = conda_builds
193
- return conda_check.conda && conda_check.mamba && conda_check.sqlite && conda_check.python
173
+ return conda_check.conda && conda_check.mamba && conda_check.python
194
174
  }
195
175
  async install(req, ondata) {
196
176
  for(let i=0; i<5; i++) {
@@ -265,7 +245,6 @@ report_errors: false`)
265
245
 
266
246
  let condaPackages = [
267
247
  this.kernel.platform === "win32" ? `"${WINDOWS_PYTHON_SSL_FIX_SPEC}"` : `"${PYTHON_INSTALL_SPEC}"`,
268
- `"${sqliteInstallSpec(this.kernel.platform)}"`,
269
248
  `"conda-libmamba-solver>=25.4.0"`,
270
249
  ]
271
250
 
package/kernel/bin/git.js CHANGED
@@ -7,7 +7,7 @@ const path = require("path")
7
7
  class Git {
8
8
  description = "Installs Git, Git LFS, Git Credential Manager, and GitHub CLI in the Pinokio environment."
9
9
  cmd() {
10
- const packages = "git=2.51.0 git-lfs git-credential-manager=2.7.3 gh=2.82.1"
10
+ const packages = '"git>=2.51.0" git-lfs git-credential-manager=2.7.3 gh=2.82.1'
11
11
  if (this.kernel.platform === "darwin") {
12
12
  return packages
13
13
  } else if (this.kernel.platform === "win32") {
@@ -24,7 +24,6 @@ const Torch = require("./torch")
24
24
  const { buildCondaListFromMeta } = require('./conda-meta')
25
25
  const {
26
26
  isExpectedPythonPinned,
27
- isExpectedSqlitePinned,
28
27
  } = require('./conda-pins')
29
28
  const { glob } = require('glob')
30
29
  const fakeUa = require('fake-useragent');
@@ -406,13 +405,6 @@ class Bin {
406
405
  conda_check.mamba = true
407
406
  }
408
407
  }
409
- // Use sqlite to check if `conda update -y --all` went through successfully
410
- // sometimes it just fails silently so need to check
411
- if (name === "sqlite") {
412
- if (isExpectedSqlitePinned(this.platform, version)) {
413
- conda_check.sqlite = true
414
- }
415
- }
416
408
  if (name === "python") {
417
409
  conda_check.python = isExpectedPythonPinned(this.platform, version, build)
418
410
  }
@@ -424,7 +416,7 @@ class Bin {
424
416
  }
425
417
  }
426
418
 
427
- if (conda_check.conda && conda_check.mamba && conda_check.sqlite && conda_check.python) {
419
+ if (conda_check.conda && conda_check.mamba && conda_check.python) {
428
420
  this.correct_conda = true
429
421
  }
430
422
  }
@@ -452,8 +444,6 @@ class Bin {
452
444
  let res
453
445
  let lines
454
446
  this.installed.conda = new Set()
455
- this.installed.conda_versions = {}
456
- this.installed.conda_builds = {}
457
447
  if (conda_exists) {
458
448
  // Try 3 times, because sometimes conda just silently quits with no error message
459
449
  for(let i=0; i<5; i++) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "7.5.4",
3
+ "version": "7.5.6",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -5990,13 +5990,13 @@ class Server {
5990
5990
  if (home) {
5991
5991
  if (version === this.version.pinokiod) {
5992
5992
  console.log("version up to date")
5993
- } else if (!(await this.kernel.exists("bin/miniforge/conda-meta"))) {
5993
+ } else if (!(await fse.pathExists(path.resolve(home, "bin/miniforge/conda-meta")))) {
5994
5994
  console.warn("[WARN] Managed home refresh deferred until Miniforge is installed")
5995
5995
  } else {
5996
5996
  // For every update, this gets triggered exactly once.
5997
5997
  // 1. first mkdir if it doesn't exist (this step is irrelevant since at this point the home dir will exist)
5998
5998
 
5999
- let exists = await this.kernel.exists(home)
5999
+ let exists = await fse.pathExists(home)
6000
6000
  if (!exists) {
6001
6001
  await fs.promises.mkdir(home, { recursive: true })
6002
6002
  }
@@ -6004,7 +6004,7 @@ class Server {
6004
6004
  needsManagedRefresh = true
6005
6005
  console.log("[TRY] Updating to the new version")
6006
6006
  let envPath = path.resolve(home, "ENVIRONMENT")
6007
- let envExists = await this.kernel.exists(envPath)
6007
+ let envExists = await fse.pathExists(envPath)
6008
6008
  if (!envExists) {
6009
6009
  let str = await Environment.ENV("system", home, this.kernel)
6010
6010
  await fs.promises.writeFile(envPath, str)
@@ -120,7 +120,7 @@ test('Conda install requests the Python 3.10.20 pin on macOS/Linux', async () =>
120
120
  assert.ok(condaInstall)
121
121
  assert.equal(
122
122
  condaInstall.message[1],
123
- 'conda install -y --override-channels -c conda-forge "python=3.10.20" "sqlite=3.47.2" "conda-libmamba-solver>=25.4.0"'
123
+ 'conda install -y --override-channels -c conda-forge "python=3.10.20" "conda-libmamba-solver>=25.4.0"'
124
124
  )
125
125
  })
126
126
 
@@ -148,7 +148,7 @@ test('Conda install keeps the Windows Python 3.10.20 SSL-fixed build pin', async
148
148
  assert.ok(condaInstall)
149
149
  assert.equal(
150
150
  condaInstall.message[1],
151
- 'conda install -y --override-channels -c conda-forge "python=3.10.20=*_1_cpython" "sqlite=3.53.2" "conda-libmamba-solver>=25.4.0"'
151
+ 'conda install -y --override-channels -c conda-forge "python=3.10.20=*_1_cpython" "conda-libmamba-solver>=25.4.0"'
152
152
  )
153
153
  })
154
154
 
@@ -23,15 +23,15 @@ function createGitBin(platform, packages) {
23
23
  test('Git bin installs Git Credential Manager with the Git bundle', () => {
24
24
  assert.equal(
25
25
  createGitBin('darwin', []).cmd(),
26
- 'git=2.51.0 git-lfs git-credential-manager=2.7.3 gh=2.82.1'
26
+ '"git>=2.51.0" git-lfs git-credential-manager=2.7.3 gh=2.82.1'
27
27
  )
28
28
  assert.equal(
29
29
  createGitBin('linux', []).cmd(),
30
- 'git=2.51.0 git-lfs git-credential-manager=2.7.3 gh=2.82.1'
30
+ '"git>=2.51.0" git-lfs git-credential-manager=2.7.3 gh=2.82.1'
31
31
  )
32
32
  assert.equal(
33
33
  createGitBin('win32', []).cmd(),
34
- 'git=2.51.0 git-lfs git-credential-manager=2.7.3 gh=2.82.1 m2-base'
34
+ '"git>=2.51.0" git-lfs git-credential-manager=2.7.3 gh=2.82.1 m2-base'
35
35
  )
36
36
  })
37
37