Skip to content

Commit 35aec57

Browse files
committed
Updated michijs
1 parent de84427 commit 35aec57

File tree

6 files changed

+35
-17
lines changed

6 files changed

+35
-17
lines changed

frameworks/keyed/michijs-map/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "js-framework-benchmark-michijs-map",
3-
"version": "1.0.4",
3+
"version": "1.1.7",
44
"description": "michijs-map",
55
"main": "index.js",
66
"js-framework-benchmark": {
@@ -28,10 +28,10 @@
2828
},
2929
"homepage": "https://github.com/krausest/js-framework-benchmark#readme",
3030
"devDependencies": {
31-
"@michijs/dev-server": "0.2.0",
32-
"typescript": "4.9.5"
31+
"@michijs/dev-server": "0.4.2",
32+
"typescript": "5.0.4"
3333
},
3434
"dependencies": {
35-
"@michijs/michijs": "1.0.4"
35+
"@michijs/michijs": "1.1.7"
3636
}
3737
}

frameworks/keyed/michijs-map/src/index.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,19 @@ const adjectives = ['pretty', 'large', 'big', 'small', 'tall', 'short', 'long',
88
const colours = ['red', 'yellow', 'blue', 'green', 'pink', 'brown', 'purple', 'brown', 'white', 'black', 'orange'];
99
const nouns = ['table', 'chair', 'house', 'bbq', 'desk', 'car', 'pony', 'cookie', 'sandwich', 'burger', 'pizza', 'mouse', 'keyboard'];
1010

11+
const adjectivesLength = adjectives.length;
12+
const coloursLength = colours.length;
13+
const nounsLength = nouns.length;
14+
1115
type Row = { label: string, id: number };
1216
function buildData(count = 1000) {
13-
const data = new Array<Row>();
17+
const data = new Array<Row>(count);
1418
for (let i = 0; i < count; i++)
15-
data.push({ id: state.nextId++, label: `${adjectives[_random(adjectives.length)]} ${colours[_random(colours.length)]} ${nouns[_random(nouns.length)]}` });
19+
data[i] = ({
20+
id: state.nextId++,
21+
label: `${adjectives[_random(adjectivesLength)]} ${colours[_random(coloursLength)]
22+
} ${nouns[_random(nounsLength)]}`,
23+
});
1624
return data;
1725
}
1826

frameworks/keyed/michijs-map/tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"ES2021"
1818
],
1919
"outDir": "dist",
20-
"moduleResolution": "node16",
20+
"moduleResolution": "node",
2121
"module": "esnext",
2222
"target": "es2019",
2323
"noUnusedLocals": false,
@@ -31,6 +31,7 @@
3131
],
3232
"exclude": [
3333
"node_modules",
34-
"dist"
34+
"dist",
35+
"build"
3536
]
3637
}

frameworks/keyed/michijs/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "js-framework-benchmark-michijs",
3-
"version": "1.0.4",
3+
"version": "1.1.7",
44
"description": "michijs",
55
"main": "index.js",
66
"js-framework-benchmark": {
@@ -28,10 +28,10 @@
2828
},
2929
"homepage": "https://github.com/krausest/js-framework-benchmark#readme",
3030
"devDependencies": {
31-
"@michijs/dev-server": "0.2.0",
32-
"typescript": "4.9.5"
31+
"@michijs/dev-server": "0.4.2",
32+
"typescript": "5.0.4"
3333
},
3434
"dependencies": {
35-
"@michijs/michijs": "1.0.4"
35+
"@michijs/michijs": "1.1.7"
3636
}
3737
}

frameworks/keyed/michijs/src/index.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,21 @@ const adjectives = ['pretty', 'large', 'big', 'small', 'tall', 'short', 'long',
88
const colours = ['red', 'yellow', 'blue', 'green', 'pink', 'brown', 'purple', 'brown', 'white', 'black', 'orange'];
99
const nouns = ['table', 'chair', 'house', 'bbq', 'desk', 'car', 'pony', 'cookie', 'sandwich', 'burger', 'pizza', 'mouse', 'keyboard'];
1010

11-
type Row = { label: string, id: number, selected?: boolean };
11+
const adjectivesLength = adjectives.length;
12+
const coloursLength = colours.length;
13+
const nounsLength = nouns.length;
14+
15+
type Row = { label: string; id: number; selected?: boolean };
1216
let nextId = 1;
1317
let selectedId: number | null = null;
1418
function buildData(count = 1000) {
15-
const data = new Array<Row>();
19+
const data = new Array<Row>(count);
1620
for (let i = 0; i < count; i++)
17-
data.push({ id: nextId++, label: `${adjectives[_random(adjectives.length)]} ${colours[_random(colours.length)]} ${nouns[_random(nouns.length)]}` });
21+
data[i] = ({
22+
id: nextId++,
23+
label: `${adjectives[_random(adjectivesLength)]} ${colours[_random(coloursLength)]
24+
} ${nouns[_random(nounsLength)]}`,
25+
});
1826
return data;
1927
}
2028
const rows = new ElementList<Row>();

frameworks/keyed/michijs/tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"ES2021"
1818
],
1919
"outDir": "dist",
20-
"moduleResolution": "node16",
20+
"moduleResolution": "node",
2121
"module": "esnext",
2222
"target": "es2019",
2323
"noUnusedLocals": false,
@@ -31,6 +31,7 @@
3131
],
3232
"exclude": [
3333
"node_modules",
34-
"dist"
34+
"dist",
35+
"build"
3536
]
3637
}

0 commit comments

Comments
 (0)