File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
test/integration/create-next-app/package-manager Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 1+ import * as semver from 'semver'
12import {
23 command ,
34 DEFAULT_FILES ,
@@ -7,11 +8,9 @@ import {
78 useTempDir ,
89} from '../utils'
910
10- const lockFile = 'bun.lockb'
11- const files = [ ...DEFAULT_FILES , lockFile ]
12-
1311describe ( 'create-next-app with package manager bun' , ( ) => {
1412 let nextTgzFilename : string
13+ let files : string [ ]
1514
1615 beforeAll ( async ( ) => {
1716 if ( ! process . env . NEXT_TEST_PKG_PATHS ) {
@@ -27,6 +26,12 @@ describe('create-next-app with package manager bun', () => {
2726 await command ( 'bun' , [ '--version' ] )
2827 // install bun if not available
2928 . catch ( ( ) => command ( 'npm' , [ 'i' , '-g' , 'bun' ] ) )
29+
30+ const bunVersion = ( await command ( 'bun' , [ '--version' ] ) ) . stdout . trim ( )
31+ // Some CI runners pre-install Bun.
32+ // Locally, we don't pin Bun either.
33+ const lockFile = semver . gte ( bunVersion , '1.2.0' ) ? 'bun.lock' : 'bun.lockb'
34+ files = [ ...DEFAULT_FILES , lockFile ]
3035 } )
3136
3237 it ( 'should use bun for --use-bun flag' , async ( ) => {
You can’t perform that action at this time.
0 commit comments