Commit bc18c92 1 parent de4d555 commit bc18c92 Copy full SHA for bc18c92
File tree 8 files changed +10
-18
lines changed
8 files changed +10
-18
lines changed Original file line number Diff line number Diff line change 48
48
- name : Unit Tests
49
49
run : npm run test:unit
50
50
51
+ - name : Bun Tests
52
+ run : npm run test:bun
53
+
51
54
- name : E2E Tests
52
55
run : npm run test:e2e
53
56
if : startsWith(matrix.os, 'ubuntu') && matrix.node == 20
Original file line number Diff line number Diff line change 30
30
"lint:lockfile" : " lockfile-lint" ,
31
31
"lint:markdown" : " markdownlint \" **/*.md\" --ignore \" **/node_modules/**/*.md\" --ignore build --config .markdownlint.js" ,
32
32
"lint:src" : " eslint --cache --cache-location node_modules/.cache/.eslintcache --ignore-path .gitignore --report-unused-disable-directives ." ,
33
- "prepare" : " src/scripts/install-hooks && test/bun-setup.sh " ,
33
+ "prepare" : " src/scripts/install-hooks" ,
34
34
"prepublishOnly" : " npm run build" ,
35
35
"prettier" : " prettier . --check" ,
36
36
"test" : " npm run test:unit && npm run test:e2e" ,
37
+ "test:bun" : " test/bun-install.sh && mocha test/bun" ,
37
38
"test:unit" : " mocha test test/package-managers/*" ,
38
39
"test:e2e" : " ./test/e2e.sh" ,
39
40
"ncu" : " node build/cli.js"
Original file line number Diff line number Diff line change 1
1
import path from 'path'
2
2
import spawn from 'spawn-please'
3
3
import keyValueBy from '../lib/keyValueBy'
4
- import programError from '../lib/programError'
5
4
import { Index } from '../types/IndexType'
6
5
import { NpmOptions } from '../types/NpmOptions'
7
6
import { Options } from '../types/Options'
@@ -15,12 +14,6 @@ async function spawnBun(
15
14
spawnPleaseOptions : SpawnPleaseOptions = { } ,
16
15
spawnOptions : Index < any > = { } ,
17
16
) : Promise < { stdout : string ; stderr : string } > {
18
- // Bun not yet supported on Windows.
19
- // @see https://github.com/oven-sh/bun/issues/43
20
- if ( process . platform === 'win32' ) {
21
- programError ( npmOptions , 'Bun not yet supported on Windows' )
22
- }
23
-
24
17
const fullArgs = [
25
18
...( npmOptions . global ? [ '--global' ] : [ ] ) ,
26
19
...( npmOptions . prefix ? [ `--prefix=${ npmOptions . prefix } ` ] : [ ] ) ,
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
# Install bun if not installed.
3
- # Must be run in a prepare script instead of devDependencies to avoid npm install failing on Windows .
4
- bun -v & > /dev/null
3
+ # Cannot be added to devDependencies as bun currently does not work on Linux .
4
+ bun -v & > /dev/null
5
5
BUN_EXISTS=" $? "
6
6
7
7
if [ $BUN_EXISTS -ne 0 ]; then
File renamed without changes.
Original file line number Diff line number Diff line change 1
- import os from 'os'
2
- import * as bun from '../../../src/package-managers/bun'
3
- import chaiSetup from '../../helpers/chaiSetup'
1
+ import * as bun from '../../src/package-managers/bun'
2
+ import chaiSetup from '../helpers/chaiSetup'
4
3
5
4
chaiSetup ( )
6
5
7
- // Bun not yet supported on Windows
8
- const describeSkipWindows = os . platform ( ) === 'win32' ? describe . skip : describe
9
- describeSkipWindows ( 'bun' , function ( ) {
6
+ describe ( 'bun' , function ( ) {
10
7
it ( 'list' , async ( ) => {
11
8
const result = await bun . list ( { cwd : __dirname } )
12
9
result . should . have . property ( 'ncu-test-v2' )
File renamed without changes.
Original file line number Diff line number Diff line change @@ -483,8 +483,6 @@ else {
483
483
testFail ( { packageManager : 'yarn' } )
484
484
} )
485
485
486
- // Bun not yet supported on Windows
487
- // const describeSkipWindows = os.platform() === 'win32' ? describe.skip : describe
488
486
// TODO: Works locally, but not in GitHub action.
489
487
describe . skip ( 'bun' , ( ) => {
490
488
testPass ( { packageManager : 'bun' } )
You can’t perform that action at this time.
0 commit comments