@@ -65,9 +65,6 @@ interface RspackPackageData {
6565
6666let rspackPackageData : RspackPackageData | null = null ;
6767
68- const RSLIB_RSBUILD_COMPAT_VERSION = '1.7.3' ;
69- const RSLIB_RSPACK_COMPAT_VERSION = '1.7.6' ;
70-
7168export function cd ( dir : string ) {
7269 cwd = path . resolve ( cwd , dir ) ;
7370}
@@ -331,24 +328,12 @@ async function getRspackPackageData(): Promise<RspackPackageData> {
331328 name : pkg . name ,
332329 directory : path . join ( stackPath , pkg . directory ) ,
333330 } ) ;
334- const normalizeAndFilterExisting = ( pkgList : RspackPackageInfo [ ] ) =>
335- pkgList . map ( normalize ) . filter ( ( pkg ) => {
336- if ( fs . existsSync ( pkg . directory ) ) {
337- return true ;
338- }
339- console . warn (
340- `[ecosystem-ci] skip missing rspack package override: ${ pkg . name } -> ${ pkg . directory } ` ,
341- ) ;
342- return false ;
343- } ) ;
344331 rspackPackageData = {
345- npm : normalizeAndFilterExisting (
346- npm [
347- optionalKey as 'darwin-arm64' | 'darwin-x64' | 'linux-x64' | 'win32-x64'
348- ] ,
349- ) ,
350- binding : normalizeAndFilterExisting ( binding ) ,
351- packages : normalizeAndFilterExisting ( packages ) ,
332+ npm : npm [
333+ optionalKey as 'darwin-arm64' | 'darwin-x64' | 'linux-x64' | 'win32-x64'
334+ ] . map ( normalize ) ,
335+ binding : binding . map ( normalize ) ,
336+ packages : packages . map ( normalize ) ,
352337 } ;
353338 return rspackPackageData ;
354339}
@@ -477,9 +462,6 @@ export async function runInRepo(options: RunOptions & RepoOptions) {
477462 overrides [ pkgInfo . name ] ||= pkgInfo . directory ;
478463 }
479464 }
480- if ( activeStack === 'rsbuild' ) {
481- overrides [ '@rslib/core>@rsbuild/core' ] ||= RSLIB_RSBUILD_COMPAT_VERSION ;
482- }
483465 await applyPackageOverrides ( {
484466 dir,
485467 pkg,
@@ -521,18 +503,6 @@ export async function runInRepo(options: RunOptions & RepoOptions) {
521503 overrides [ pkgInfo . name ] ||= pkgInfo . directory ;
522504 }
523505 }
524- overrides [ '@rslib/core>@rsbuild/core' ] ||= RSLIB_RSBUILD_COMPAT_VERSION ;
525- overrides [
526- `@rsbuild/core@${ RSLIB_RSBUILD_COMPAT_VERSION } >@rspack/core`
527- ] ||= RSLIB_RSPACK_COMPAT_VERSION ;
528- overrides [
529- `@rspack/core@${ RSLIB_RSPACK_COMPAT_VERSION } >@rspack/binding`
530- ] ||= RSLIB_RSPACK_COMPAT_VERSION ;
531- for ( const pkgInfo of npm ) {
532- overrides [
533- `@rspack/binding@${ RSLIB_RSPACK_COMPAT_VERSION } >${ pkgInfo . name } `
534- ] ||= RSLIB_RSPACK_COMPAT_VERSION ;
535- }
536506 await applyPackageOverrides ( {
537507 dir,
538508 pkg,
@@ -744,15 +714,6 @@ async function applyPackageOverrides({
744714 } ;
745715 devDependencyStrategy ?: 'all' | 'local' ;
746716} ) {
747- const isValidManifestDepName = ( name : string ) : boolean => {
748- if ( name . includes ( '>' ) ) {
749- return false ;
750- }
751- if ( name . startsWith ( '@' ) ) {
752- return name . indexOf ( '@' , 1 ) === - 1 ;
753- }
754- return ! name . includes ( '@' ) ;
755- } ;
756717 const useFileProtocol = ( v : string ) =>
757718 isLocalOverride ( v ) ? `file:${ path . resolve ( v ) } ` : v ;
758719 const normalizedOverrides = Object . fromEntries (
@@ -763,16 +724,10 @@ async function applyPackageOverrides({
763724
764725 const devOverrides =
765726 devDependencyStrategy === 'all'
766- ? Object . fromEntries (
767- Object . entries ( normalizedOverrides ) . filter ( ( [ key ] ) =>
768- isValidManifestDepName ( key ) ,
769- ) ,
770- )
727+ ? normalizedOverrides
771728 : Object . fromEntries (
772- Object . entries ( normalizedOverrides ) . filter (
773- ( [ key , value ] ) =>
774- isValidManifestDepName ( key ) &&
775- ( value as string ) . startsWith ( 'file:' ) ,
729+ Object . entries ( normalizedOverrides ) . filter ( ( [ _key , value ] ) =>
730+ ( value as string ) . startsWith ( 'file:' ) ,
776731 ) ,
777732 ) ;
778733
0 commit comments