dugite 3.0.0-rc5 → 3.0.0-rc7

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-rc5",
3
+ "version": "3.0.0-rc7",
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
+ )
@@ -1,42 +1,42 @@
1
1
  {
2
2
  "win32-x64": {
3
- "name": "dugite-native-v2.45.1-e87d290-windows-x64.tar.gz",
4
- "url": "https://github.com/desktop/dugite-native/releases/download/v2.45.1/dugite-native-v2.45.1-e87d290-windows-x64.tar.gz",
5
- "checksum": "6a79708447291d8b95db9f523f949389d63fca1a25b72520d1a0b9a8d7ede3e1"
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.1-e87d290-windows-x86.tar.gz",
9
- "url": "https://github.com/desktop/dugite-native/releases/download/v2.45.1/dugite-native-v2.45.1-e87d290-windows-x86.tar.gz",
10
- "checksum": "99dafc60fdeb646988c7d6f54c74a557f877b28624ed82e4201460b7d2394d49"
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.1-e87d290-macOS-x64.tar.gz",
14
- "url": "https://github.com/desktop/dugite-native/releases/download/v2.45.1/dugite-native-v2.45.1-e87d290-macOS-x64.tar.gz",
15
- "checksum": "2a3c0b52e98a8423fe54722dd4dce905fce2d1d3014452e26df01f84c5033c3f"
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.1-e87d290-macOS-arm64.tar.gz",
19
- "url": "https://github.com/desktop/dugite-native/releases/download/v2.45.1/dugite-native-v2.45.1-e87d290-macOS-arm64.tar.gz",
20
- "checksum": "453ea5c74da5bb75b0474b19e0269feb548eaf2d2449b3e74a84123ced415e4c"
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.1-e87d290-ubuntu-x64.tar.gz",
24
- "url": "https://github.com/desktop/dugite-native/releases/download/v2.45.1/dugite-native-v2.45.1-e87d290-ubuntu-x64.tar.gz",
25
- "checksum": "cdf8c4cdca273e015d95c15fcc99e2322a97316f77f0b958b6b86424ca2b12da"
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.1-e87d290-ubuntu-x86.tar.gz",
29
- "url": "https://github.com/desktop/dugite-native/releases/download/v2.45.1/dugite-native-v2.45.1-e87d290-ubuntu-x86.tar.gz",
30
- "checksum": "8ef716da12f5c2ca03288a5ee10e6cdd5ad958a164b379a6aafa19ca7f4eb72c"
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.1-e87d290-ubuntu-arm.tar.gz",
34
- "url": "https://github.com/desktop/dugite-native/releases/download/v2.45.1/dugite-native-v2.45.1-e87d290-ubuntu-arm.tar.gz",
35
- "checksum": "5b8d27f9eba833477f518377ba5339c690523cc218fb3b3189fa8cacb229493f"
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.1-e87d290-ubuntu-arm64.tar.gz",
39
- "url": "https://github.com/desktop/dugite-native/releases/download/v2.45.1/dugite-native-v2.45.1-e87d290-ubuntu-arm64.tar.gz",
40
- "checksum": "21cec4d32ceec81efa146a40253a2f766a1d3b34a6e7c1fed1d87c7c553b3c99"
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)