dugite 3.0.0-rc6 → 3.0.0-rc8

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 CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "dugite",
3
- "version": "3.0.0-rc6",
3
+ "version": "3.0.0-rc8",
4
4
  "description": "Elegant bindings for Git",
5
5
  "main": "./build/lib/index.js",
6
6
  "typings": "./build/lib/index.d.ts",
7
7
  "scripts": {
8
- "clean": "rimraf build",
8
+ "clean": "node script/clean.js",
9
9
  "build": "yarn clean && tsc -p ./tsconfig.json && tsc -p ./examples/tsconfig.json",
10
10
  "prepack": "yarn build && yarn test",
11
11
  "postpublish": "git push --follow-tags",
@@ -36,12 +36,8 @@
36
36
  "devDependencies": {
37
37
  "@types/node": "20",
38
38
  "@types/progress": "^2.0.1",
39
- "@types/rimraf": "2.0.2",
40
- "@types/temp": "^0.9.4",
41
39
  "node-test-github-reporter": "^1.2.0",
42
40
  "prettier": "^3.3.1",
43
- "rimraf": "^5.0.7",
44
- "temp": "^0.9.4",
45
41
  "tsx": "^4.10.5",
46
42
  "typescript": "^5.4.5"
47
43
  }
@@ -0,0 +1,6 @@
1
+ const { rm } = require('fs/promises')
2
+ const { join } = require('path')
3
+
4
+ rm(join(__dirname, '..', 'build'), { recursive: true, force: true }).catch(
5
+ console.error
6
+ )
package/script/config.js CHANGED
@@ -23,12 +23,6 @@ function getConfig() {
23
23
  arch = process.env.npm_config_arch
24
24
  }
25
25
 
26
- if (process.platform === 'win32' && arch === 'arm64') {
27
- // Use the Dugite Native ia32 package for Windows arm64 (arm64 can run 32-bit code through emulation)
28
- console.log('Downloading 32-bit Dugite Native for Windows arm64')
29
- arch = 'ia32'
30
- }
31
-
32
26
  const key = `${process.platform}-${arch}`
33
27
 
34
28
  const entry = embeddedGit[key]
@@ -1,42 +1,42 @@
1
1
  {
2
2
  "win32-x64": {
3
- "name": "dugite-native-v2.45.3-249d956-windows-x64.tar.gz",
4
- "url": "https://github.com/desktop/dugite-native/releases/download/v2.45.3/dugite-native-v2.45.3-249d956-windows-x64.tar.gz",
5
- "checksum": "c673e4afba7541767ae2421c40d0dda9e0af6d58c02dea28207627d4dff05fb3"
3
+ "name": "dugite-native-v2.47.1-8d348e6-windows-x64.tar.gz",
4
+ "url": "https://github.com/desktop/dugite-native/releases/download/v2.47.1/dugite-native-v2.47.1-8d348e6-windows-x64.tar.gz",
5
+ "checksum": "bca0fb95b136ec4227452ee603eb5b8bf5213f9a8c99b72a617db654046c17c7"
6
6
  },
7
7
  "win32-ia32": {
8
- "name": "dugite-native-v2.45.3-249d956-windows-x86.tar.gz",
9
- "url": "https://github.com/desktop/dugite-native/releases/download/v2.45.3/dugite-native-v2.45.3-249d956-windows-x86.tar.gz",
10
- "checksum": "26c129ad566ea27100e4d724badb40ee6becedf21db229c96553f4b835367056"
8
+ "name": "dugite-native-v2.47.1-8d348e6-windows-x86.tar.gz",
9
+ "url": "https://github.com/desktop/dugite-native/releases/download/v2.47.1/dugite-native-v2.47.1-8d348e6-windows-x86.tar.gz",
10
+ "checksum": "f938bc2ef0ae702479b53bb0838b5cfeea14d35c4215757e1a6df95dea52cad4"
11
11
  },
12
12
  "darwin-x64": {
13
- "name": "dugite-native-v2.45.3-249d956-macOS-x64.tar.gz",
14
- "url": "https://github.com/desktop/dugite-native/releases/download/v2.45.3/dugite-native-v2.45.3-249d956-macOS-x64.tar.gz",
15
- "checksum": "f8191f31248200866172ef7be6e8c97d724278c90a4c021c71362bde47a3ee2a"
13
+ "name": "dugite-native-v2.47.1-8d348e6-macOS-x64.tar.gz",
14
+ "url": "https://github.com/desktop/dugite-native/releases/download/v2.47.1/dugite-native-v2.47.1-8d348e6-macOS-x64.tar.gz",
15
+ "checksum": "475040cf643a3962d557aad9b91e861eace6d6bb28c01bb54535544c43e19459"
16
16
  },
17
17
  "darwin-arm64": {
18
- "name": "dugite-native-v2.45.3-249d956-macOS-arm64.tar.gz",
19
- "url": "https://github.com/desktop/dugite-native/releases/download/v2.45.3/dugite-native-v2.45.3-249d956-macOS-arm64.tar.gz",
20
- "checksum": "b24aa30a56cc352159e1c842f1d248009e61f1b9e594dd34f09809dc792cf90f"
18
+ "name": "dugite-native-v2.47.1-8d348e6-macOS-arm64.tar.gz",
19
+ "url": "https://github.com/desktop/dugite-native/releases/download/v2.47.1/dugite-native-v2.47.1-8d348e6-macOS-arm64.tar.gz",
20
+ "checksum": "451dc41889a4deef06e2d3495364f74f6416bda8234b876144f5c254874b306d"
21
21
  },
22
22
  "linux-x64": {
23
- "name": "dugite-native-v2.45.3-249d956-ubuntu-x64.tar.gz",
24
- "url": "https://github.com/desktop/dugite-native/releases/download/v2.45.3/dugite-native-v2.45.3-249d956-ubuntu-x64.tar.gz",
25
- "checksum": "ca947928afd3c58b49bd686824d3b7d0b0103add6f77ccc3148f16b569db99dc"
23
+ "name": "dugite-native-v2.47.1-8d348e6-ubuntu-x64.tar.gz",
24
+ "url": "https://github.com/desktop/dugite-native/releases/download/v2.47.1/dugite-native-v2.47.1-8d348e6-ubuntu-x64.tar.gz",
25
+ "checksum": "0e6b3a0776e92ddef3a3fdc966d960fbf150b3f5bb74632576c0bdfbcb638042"
26
26
  },
27
27
  "linux-ia32": {
28
- "name": "dugite-native-v2.45.3-249d956-ubuntu-x86.tar.gz",
29
- "url": "https://github.com/desktop/dugite-native/releases/download/v2.45.3/dugite-native-v2.45.3-249d956-ubuntu-x86.tar.gz",
30
- "checksum": "3b4989b0656654e7c5e7bde52f8be1cd575590276c7a5d7b1acfd17af4e9e022"
28
+ "name": "dugite-native-v2.47.1-8d348e6-ubuntu-x86.tar.gz",
29
+ "url": "https://github.com/desktop/dugite-native/releases/download/v2.47.1/dugite-native-v2.47.1-8d348e6-ubuntu-x86.tar.gz",
30
+ "checksum": "7263bed583503808a11a5e3b5e259e63fe66e08d8c8c3934bef3bc6ca42f1e2e"
31
31
  },
32
32
  "linux-arm": {
33
- "name": "dugite-native-v2.45.3-249d956-ubuntu-arm.tar.gz",
34
- "url": "https://github.com/desktop/dugite-native/releases/download/v2.45.3/dugite-native-v2.45.3-249d956-ubuntu-arm.tar.gz",
35
- "checksum": "725398745dacb94d82b23d01f5348aebe413c924bc0b78178f2fbff517741f61"
33
+ "name": "dugite-native-v2.47.1-8d348e6-ubuntu-arm.tar.gz",
34
+ "url": "https://github.com/desktop/dugite-native/releases/download/v2.47.1/dugite-native-v2.47.1-8d348e6-ubuntu-arm.tar.gz",
35
+ "checksum": "a89292d44106150037932b95ddc233e09c6faf7489b44672c93d801838f496cd"
36
36
  },
37
37
  "linux-arm64": {
38
- "name": "dugite-native-v2.45.3-249d956-ubuntu-arm64.tar.gz",
39
- "url": "https://github.com/desktop/dugite-native/releases/download/v2.45.3/dugite-native-v2.45.3-249d956-ubuntu-arm64.tar.gz",
40
- "checksum": "e605f8f5d5146e8ba10be30a781639ef81de4b01e85c87d24641316c928b88ed"
38
+ "name": "dugite-native-v2.47.1-8d348e6-ubuntu-arm64.tar.gz",
39
+ "url": "https://github.com/desktop/dugite-native/releases/download/v2.47.1/dugite-native-v2.47.1-8d348e6-ubuntu-arm64.tar.gz",
40
+ "checksum": "b9fcc671557a86259408b31875badaedd43408c9ef1fd4d502386d2bd36923ef"
41
41
  }
42
42
  }
package/script/test.mjs CHANGED
@@ -1,43 +1,23 @@
1
1
  import { spawn } from 'child_process'
2
- import { glob } from 'glob'
3
- import { dirname, resolve } from 'path'
4
- import { fileURLToPath } from 'url'
2
+ import { join } from 'path'
3
+ import { readdir } from 'fs/promises'
5
4
 
6
- if (process.argv.some(arg => ['-h', '--help'].includes(arg))) {
7
- console.log(`Usage: ${process.argv0} [kind]`)
8
- console.log(
9
- ' kind: The kind of tests to run (e.g. "fast", "slow", "external", "all")'
10
- )
11
- process.exit(0)
5
+ function reporter(r) {
6
+ return ['--test-reporter', r, '--test-reporter-destination', 'stdout']
12
7
  }
13
8
 
14
- ;(async function (kind) {
15
- const wildcard = kind && kind !== 'all' ? `${kind}/**` : '**'
16
- const files = await glob(`test/${wildcard}/*-test.ts`)
17
- const reporterDestinationArgs = ['--test-reporter-destination', 'stdout']
18
- const specTestReporterArgs = [
19
- '--test-reporter',
20
- 'spec',
21
- ...reporterDestinationArgs,
22
- ]
9
+ const files = await readdir('test', { recursive: true }).then(x =>
10
+ x.filter(f => f.endsWith('-test.ts')).map(f => join('test', f))
11
+ )
23
12
 
24
- const testReporterArgs = process.env.GITHUB_ACTIONS
25
- ? [
26
- '--test-reporter',
27
- 'node-test-github-reporter',
28
- ...reporterDestinationArgs,
29
- ...specTestReporterArgs,
30
- ]
31
- : specTestReporterArgs
13
+ process.env.LOCAL_GIT_DIRECTORY = 'git'
32
14
 
33
- spawn('node', ['--import', 'tsx', ...testReporterArgs, '--test', ...files], {
34
- stdio: 'inherit',
35
- env: {
36
- ...process.env,
37
- LOCAL_GIT_DIRECTORY: resolve(
38
- dirname(fileURLToPath(import.meta.url)),
39
- '../git/'
40
- ),
41
- },
42
- }).on('exit', process.exit)
43
- })(process.argv[2])
15
+ const args = [
16
+ ...['--import', 'tsx'],
17
+ '--test',
18
+ ...reporter('spec'),
19
+ ...(process.env.GITHUB_ACTIONS ? reporter('node-test-github-reporter') : []),
20
+ ...files,
21
+ ]
22
+
23
+ spawn('node', args, { stdio: 'inherit' }).on('exit', process.exit)