File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
test/integration/create-next-app/package-manager Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 1+ import execa from 'execa'
2+ import * as semver from 'semver'
13import {
24 command ,
35 DEFAULT_FILES ,
@@ -7,11 +9,9 @@ import {
79 useTempDir ,
810} from '../utils'
911
10- const lockFile = 'bun.lockb'
11- const files = [ ...DEFAULT_FILES , lockFile ]
12-
1312describe ( 'create-next-app with package manager bun' , ( ) => {
1413 let nextTgzFilename : string
14+ let files : string [ ]
1515
1616 beforeAll ( async ( ) => {
1717 if ( ! process . env . NEXT_TEST_PKG_PATHS ) {
@@ -27,6 +27,12 @@ describe('create-next-app with package manager bun', () => {
2727 await command ( 'bun' , [ '--version' ] )
2828 // install bun if not available
2929 . catch ( ( ) => command ( 'npm' , [ 'i' , '-g' , 'bun' ] ) )
30+
31+ const bunVersion = ( await execa ( 'bun' , [ '--version' ] ) ) . stdout . trim ( )
32+ // Some CI runners pre-install Bun.
33+ // Locally, we don't pin Bun either.
34+ const lockFile = semver . gte ( bunVersion , '1.2.0' ) ? 'bun.lock' : 'bun.lockb'
35+ files = [ ...DEFAULT_FILES , lockFile ]
3036 } )
3137
3238 it ( 'should use bun for --use-bun flag' , async ( ) => {
You can’t perform that action at this time.
0 commit comments