@@ -58,7 +58,7 @@ function writeJson(filePath, value) {
5858
5959function writePackage ( rootDir , folderName , overrides = { } , toolboxIcon = `icon-${ folderName } ` ) {
6060 const packageJson = {
61- name : `@aily-project/lib-${ folderName . replaceAll ( '_' , '-' ) } ` ,
61+ name : `@aily-project-linux /lib-${ folderName . replaceAll ( '_' , '-' ) } ` ,
6262 nickname : folderName ,
6363 version : '1.0.0' ,
6464 description : `${ folderName } description` ,
@@ -94,7 +94,7 @@ function createFixture() {
9494 tested : true ,
9595 } ) ;
9696 writePackage ( rootDir , 'alpha' , {
97- name : '@aily-project/lib-alpha' ,
97+ name : '@aily-project-linux /lib-alpha' ,
9898 nickname : 'Alpha' ,
9999 tags : [ 'communication' ] ,
100100 } ) ;
@@ -210,13 +210,13 @@ test('Linux metadata scripts generate the complete, sorted release chain', (t) =
210210 assert . deepEqual (
211211 libraries . map ( ( library ) => library . name ) ,
212212 [
213- '@aily-project/lib-zeta' ,
214- '@aily-project/lib-alpha' ,
215- '@aily-project/lib-core' ,
216- '@aily-project/lib-core-math' ,
213+ '@aily-project-linux /lib-zeta' ,
214+ '@aily-project-linux /lib-alpha' ,
215+ '@aily-project-linux /lib-core' ,
216+ '@aily-project-linux /lib-core-math' ,
217217 ] ,
218218 ) ;
219- const alphaLibrary = libraries . find ( ( library ) => library . name === '@aily-project/lib-alpha' ) ;
219+ const alphaLibrary = libraries . find ( ( library ) => library . name === '@aily-project-linux /lib-alpha' ) ;
220220 assert . equal ( alphaLibrary . icon , 'icon-alpha' ) ;
221221 assert . equal ( alphaLibrary . url , 'https://example.com/alpha' ) ;
222222 assert . equal ( libraries [ 0 ] . tested , true ) ;
@@ -265,10 +265,10 @@ test('Linux metadata scripts generate the complete, sorted release chain', (t) =
265265 fs . readFileSync ( path . join ( rootDir , 'package-folder-map-linux.json' ) , 'utf8' ) ,
266266 ) ;
267267 assert . deepEqual ( Object . keys ( folderMap ) , [
268- '@aily-project/lib-alpha' ,
269- '@aily-project/lib-core' ,
270- '@aily-project/lib-core-math' ,
271- '@aily-project/lib-zeta' ,
268+ '@aily-project-linux /lib-alpha' ,
269+ '@aily-project-linux /lib-core' ,
270+ '@aily-project-linux /lib-core-math' ,
271+ '@aily-project-linux /lib-zeta' ,
272272 ] ) ;
273273 assert . equal ( new Set ( Object . values ( folderMap ) ) . size , 4 ) ;
274274} ) ;
@@ -288,13 +288,13 @@ test('metadata scripts fail with a non-zero status on malformed or duplicate pac
288288 fs . writeFileSync ( path . join ( malformedRoot , 'alpha' , 'package.json' ) , '{' , 'utf8' ) ;
289289 assert . notEqual ( runScript ( malformedRoot , 'genjson.js' ) . status , 0 ) ;
290290
291- writePackage ( duplicateRoot , 'duplicate' , { name : '@aily-project/lib-alpha' } ) ;
291+ writePackage ( duplicateRoot , 'duplicate' , { name : '@aily-project-linux /lib-alpha' } ) ;
292292 assert . notEqual ( runScript ( duplicateRoot , 'generate-package-folder-map.js' ) . status , 0 ) ;
293293
294294 fs . rmSync ( path . join ( missingIconRoot , 'alpha' , 'toolbox.json' ) ) ;
295295 assert . notEqual ( runScript ( missingIconRoot , 'genjson-ai.js' ) . status , 0 ) ;
296296
297- writePackage ( invalidNameRoot , 'invalid_name' , { name : [ '@aily-project/lib-invalid' ] } ) ;
297+ writePackage ( invalidNameRoot , 'invalid_name' , { name : [ '@aily-project-linux /lib-invalid' ] } ) ;
298298 const invalidNameResult = runScript ( invalidNameRoot , 'genjson.js' ) ;
299299 assert . notEqual ( invalidNameResult . status , 0 ) ;
300300 assert . match ( invalidNameResult . stderr , / n a m e 必 须 是 字 符 串 / ) ;
@@ -318,7 +318,7 @@ test('the real 142-package metadata completes the full index and map chain', (t)
318318 const { getPublishablePackages } = require ( '../scripts/genjson' ) ;
319319 const packages = getPublishablePackages ( ROOT ) ;
320320 const expectedCores = new Map ( packages . map ( ( { packageJson } ) => [
321- packageJson . name . replace ( '@aily-project/' , '' ) ,
321+ packageJson . name . replace ( '@aily-project-linux /' , '' ) ,
322322 packageJson . compatibility . type ,
323323 ] ) ) ;
324324 const libraries = JSON . parse ( fs . readFileSync ( path . join ( rootDir , 'libraries-linux.json' ) , 'utf8' ) ) ;
@@ -350,7 +350,7 @@ test('the real 142-package metadata completes the full index and map chain', (t)
350350 for ( const library of index . libraries ) {
351351 assertIndexLibrarySchema ( library ) ;
352352 assert . deepEqual ( library . supportedCores , expectedCores . get ( library . name ) ) ;
353- const folderName = folderMap [ `@aily-project/${ library . name } ` ] ;
353+ const folderName = folderMap [ `@aily-project-linux /${ library . name } ` ] ;
354354 assert . ok ( folderName , library . name ) ;
355355 const info = JSON . parse ( fs . readFileSync ( path . join ( rootDir , folderName , 'info.json' ) , 'utf8' ) ) ;
356356 assertInfoSchema ( info ) ;
0 commit comments