This repository was archived by the owner on Feb 17, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- const plugin = require ( "../../packages/cypress/dist/index.cjs " ) ;
1+ const plugin = require ( "../../packages/cypress" ) ;
22
33module . exports = plugin ;
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ module.exports = {
2121 } ,
2222 ] ,
2323 ] ,
24- testSequencer : require . resolve ( "./packages/jest/dist/index.cjs " ) ,
24+ testSequencer : require . resolve ( "./packages/jest" ) ,
2525 testEnvironment : "node" ,
2626 testMatch : [ "**/?(*.)?(spec).js" ] ,
2727 testTimeout : 15000 ,
Original file line number Diff line number Diff line change 11{
22 "name" : " split-tests-monorepo" ,
33 "private" : true ,
4- "version" : " 0.0.7 " ,
4+ "version" : " 0.1.1 " ,
55 "description" : " Split test files in Jest and Cypress into parallel CI jobs" ,
66 "author" : {
77 "name" : " Kamil Kisiela" ,
1616 "e2e" : " cypress run"
1717 },
1818 "devDependencies" : {
19- "@changesets/cli" : " 2.17.0" ,
20- "@types/glob" : " 7 .1.3 " ,
21- "@types/node" : " 14.14.21 " ,
22- "bob-the-bundler" : " 1.1.0" ,
23- "cypress" : " 6.2.1" ,
24- "jest" : " 26.6.3" ,
25- "jest-junit" : " 12.0.0" ,
26- "typescript" : " 4.1.3"
19+ "@changesets/cli" : " ~ 2.17.0" ,
20+ "@types/glob" : " ~8 .1.0 " ,
21+ "@types/node" : " ~22.9.3 " ,
22+ "bob-the-bundler" : " ^ 1.1.0" ,
23+ "cypress" : " ~ 6.2.1" ,
24+ "jest" : " ~ 26.6.3" ,
25+ "jest-junit" : " ~ 12.0.0" ,
26+ "typescript" : " ^ 4.1.3"
2727 },
2828 "workspaces" : {
2929 "packages" : [" packages/*" ]
Original file line number Diff line number Diff line change 11# @split-tests/core
22
3+ ## 0.2.2
4+
5+ ### Patch Changes
6+
7+ - Updated dependencies
8+ 9+
310## 0.2.1
411
512### Patch Changes
Original file line number Diff line number Diff line change 11{
22 "name" : " @split-tests/core" ,
3- "version" : " 0.2.1 " ,
3+ "version" : " 0.2.2 " ,
44 "description" : " internal" ,
55 "author" : {
66 "name" : " Kamil Kisiela" ,
2525 "access" : " public"
2626 },
2727 "license" : " MIT" ,
28- "main" : " dist/index.cjs. js" ,
29- "module" : " dist/index.esm.js " ,
28+ "main" : " dist/index.js" ,
29+ "module" : " dist/index.mjs " ,
3030 "typings" : " dist/index.d.ts" ,
31+ "exports" : {
32+ "." : {
33+ "import" : " ./dist/index.mjs" ,
34+ "require" : " ./dist/index.js"
35+ },
36+ "./*" : {
37+ "import" : " ./dist/*.mjs" ,
38+ "require" : " ./dist/*.js"
39+ }
40+ },
3141 "typescript" : {
3242 "definition" : " dist/index.d.ts"
3343 },
3444 "scripts" : {
3545 "prepack" : " bob prepack"
3646 },
3747 "dependencies" : {
38- "fast-xml-parser" : " 4.2.4 "
48+ "fast-xml-parser" : " ~ 4.2.7 "
3949 }
4050}
Original file line number Diff line number Diff line change 11# @split-tests/cypress
22
3+ ## 0.2.2
4+
5+ ### Patch Changes
6+
7+ - Updated dependencies
8+ - @split-tests/core @0.2.2
9+
310## 0.2.1
411
512### Patch Changes
Original file line number Diff line number Diff line change 11{
22 "name" : " @split-tests/cypress" ,
3- "version" : " 0.2.1 " ,
3+ "version" : " 0.2.2 " ,
44 "description" : " Splits test files in Cypress and ensures all parallel jobs finish work at a similar time" ,
55 "author" : {
66 "name" : " Kamil Kisiela" ,
2424 "access" : " public"
2525 },
2626 "license" : " MIT" ,
27- "main" : " dist/index.cjs. js" ,
28- "module" : " dist/index.esm.js " ,
27+ "main" : " dist/index.js" ,
28+ "module" : " dist/index.mjs " ,
2929 "typings" : " dist/index.d.ts" ,
30+ "exports" : {
31+ "." : {
32+ "import" : " ./dist/index.mjs" ,
33+ "require" : " ./dist/index.js"
34+ },
35+ "./*" : {
36+ "import" : " ./dist/*.mjs" ,
37+ "require" : " ./dist/*.js"
38+ }
39+ },
3040 "typescript" : {
3141 "definition" : " dist/index.d.ts"
3242 },
3343 "scripts" : {
3444 "prepack" : " bob prepack"
3545 },
3646 "dependencies" : {
37- "@split-tests/core" : " ^ 0.2.1 " ,
47+ "@split-tests/core" : " 0.2.2 " ,
3848 "glob" : " ^7.1.6"
3949 }
4050}
Original file line number Diff line number Diff line change 11# @split-tests/jest
22
3+ ## 0.2.2
4+
5+ ### Patch Changes
6+
7+ - Updated dependencies
8+ - @split-tests/core @0.2.2
9+
310## 0.2.1
411
512### Patch Changes
Original file line number Diff line number Diff line change 11{
22 "name" : " @split-tests/jest" ,
3- "version" : " 0.2.1 " ,
3+ "version" : " 0.2.2 " ,
44 "description" : " Splits test files in Jest and ensures all parallel jobs finish work at a similar time" ,
55 "author" : {
66 "name" : " Kamil Kisiela" ,
2525 "access" : " public"
2626 },
2727 "license" : " MIT" ,
28- "main" : " dist/index.cjs. js" ,
29- "module" : " dist/index.esm.js " ,
28+ "main" : " dist/index.js" ,
29+ "module" : " dist/index.mjs " ,
3030 "typings" : " dist/index.d.ts" ,
31+ "exports" : {
32+ "." : {
33+ "import" : " ./dist/index.mjs" ,
34+ "require" : " ./dist/index.js"
35+ },
36+ "./*" : {
37+ "import" : " ./dist/*.mjs" ,
38+ "require" : " ./dist/*.js"
39+ }
40+ },
3141 "typescript" : {
3242 "definition" : " dist/index.d.ts"
3343 },
3444 "scripts" : {
3545 "prepack" : " bob prepack"
3646 },
3747 "dependencies" : {
38- "@split-tests/core" : " ^ 0.2.1 "
48+ "@split-tests/core" : " 0.2.2 "
3949 },
4050 "buildOptions" : {
4151 "external" : [
Original file line number Diff line number Diff line change @@ -26,12 +26,12 @@ function getArg(name: string) {
2626
2727export default class JobSequencer extends Sequencer {
2828 // @ts -ignore
29- async sort ( tests : Test [ ] ) {
29+ async sort ( tests : Test [ ] ) : Test [ ] {
3030 let detected = detectEnv ( {
3131 indexName : "JEST_JOBS_INDEX" ,
3232 totalName : "JEST_JOBS_TOTAL" ,
3333 } ) ;
34-
34+
3535 if ( ! detected && ( getArg ( "jobsTotal" ) && getArg ( "jobsIndex" ) ) ) {
3636 detected = {
3737 total : parseInt (
@@ -79,11 +79,14 @@ export default class JobSequencer extends Sequencer {
7979 reports = removeDeletedFiles ( reports , normalizedTests ) ;
8080 reports = addNewFiles ( reports , normalizedTests ) ;
8181
82- const groups = distribute ( reports , total ) ;
83-
84- return groups [ index ] . files . map ( ( testFile ) =>
85- normalizedTests . find ( ( t ) => t . path === testFile )
86- ) ;
82+ const files = ( distribute ( reports , total ) ) [ index ] . files ;
83+ return files . reduce ( ( acc : Test [ ] , file : string ) => {
84+ const test = normalizedTests . find ( ( t ) => t . path === file ) ;
85+ if ( test ) {
86+ acc . push ( test ) ;
87+ }
88+ return acc ;
89+ } , [ ] ) ;
8790 }
8891
8992 return tests ;
You can’t perform that action at this time.
0 commit comments