Skip to content

Commit

Permalink
fixed broken docs demos, updated package-lock.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Havunen committed Oct 30, 2023
1 parent c6ea9c5 commit a1c6997
Show file tree
Hide file tree
Showing 29 changed files with 1,805 additions and 1,327 deletions.
6 changes: 3 additions & 3 deletions docs/1kcomponents/app.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Component, render } from 'inferno';
import { startFPSMonitor, startMemMonitor } from 'perf-monitor';
// import { startFPSMonitor, startMemMonitor } from 'perf-monitor';
import { interpolateViridis } from 'd3-scale-chromatic';

startFPSMonitor();
startMemMonitor();
// startFPSMonitor();
// startMemMonitor();

function map(arr, to) {
let out = [];
Expand Down
2 changes: 1 addition & 1 deletion docs/1kcomponents/dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/animations-demo-inner/dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/animations-demo/dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/animations-global-demo/dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/animations/dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/async-render/dist/bundle.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions docs/build.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {rollup} from "rollup";
import { existsSync, readdirSync, statSync } from "fs";
import commonjsPlugin from "@rollup/plugin-commonjs";
import nodeResolvePlugin from "@rollup/plugin";
import nodeResolvePlugin from "@rollup/plugin-node-resolve";
import { dirname, join, resolve } from "path";
import replace from "@rollup/plugin-replace";
import terser from '@rollup/plugin-terser';
Expand Down Expand Up @@ -59,7 +59,8 @@ const plugins = [
{find: 'inferno-test-utils', replacement: resolvePkg('inferno-test-utils')},
{find: 'inferno-vnode-flags', replacement: resolvePkg('inferno-vnode-flags')},
{find: 'inferno-clone-vnode', replacement: resolvePkg('inferno-clone-vnode')},
{find: 'mobx', replacement: join(__dirname, '../../node_modules/mobx/dist/mobx.esm.js')}
{find: 'mobx', replacement: join(__dirname, '../node_modules/mobx/dist/mobx.esm.js')},
{find: 'perf-monitor', replacement: join(__dirname, '../node_modules/perf-monitor/dist/index.js')}
]
})
];
Expand Down
2 changes: 1 addition & 1 deletion docs/compat/dist/bundle.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions docs/dbmonster-mobx/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { startFPSMonitor, startMemMonitor, initProfiler, startProfile, endProfile } from 'perf-monitor';
// import { startFPSMonitor, startMemMonitor, initProfiler, startProfile, endProfile } from 'perf-monitor';
import { createVNode, createComponentVNode, createFragment, render, Component } from 'inferno';
import { observerWrap, observerPatch, observer } from 'inferno-mobx';
import { action, observable } from 'mobx';
Expand Down Expand Up @@ -413,17 +413,17 @@ const Table = observerWrap(TableComponent);

const update = action(() => {
updateData();
startProfile('view update');
// startProfile('view update');
});

function loop() {
update();
endProfile('view update');
// endProfile('view update');
}

startFPSMonitor();
startMemMonitor();
initProfiler('view update');
// startFPSMonitor();
// startMemMonitor();
// initProfiler('view update');

// functional components with observerWrap
render(createComponentVNode(VNodeFlags.ComponentFunction, Table, { list: data }), app);
Expand Down
2 changes: 1 addition & 1 deletion docs/dbmonster-mobx/dist/bundle.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions docs/dbmonster/app.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { startFPSMonitor, startMemMonitor, initProfiler, startProfile, endProfile } from 'perf-monitor';
// import { startFPSMonitor, startMemMonitor, initProfiler, startProfile, endProfile } from 'perf-monitor';
import { createVNode, render } from 'inferno';

var elem = document.getElementById('app');

startFPSMonitor();
startMemMonitor();
initProfiler('view update');
// startFPSMonitor();
// startMemMonitor();
// initProfiler('view update');

function renderBenchmark(dbs) {
var length = dbs.length;
Expand Down Expand Up @@ -55,9 +55,9 @@ function renderBenchmark(dbs) {

function loop() {
var dbs = ENV.generateData(false).toArray();
startProfile('view update');
// startProfile('view update');
renderBenchmark(dbs);
endProfile('view update');
// endProfile('view update');
}

setInterval(loop, 0);
2 changes: 1 addition & 1 deletion docs/dbmonster/dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/event-test/dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/form/dist/bundle.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ <h2>Benchmarks</h2>
This version of UI Benchmark tracks performance regressions in Inferno's normalization algorithm. Do not write code like this.<br />
<small><a href="uibench-normalization/index.html">Example</a> | <a href="https://github.com/infernojs/inferno/blob/master/docs/uibench-normalization/app.js">View source...</a></small>
</p>
<p>
<a href="uibench-lifecycle/index.html">UI Benchmark (Lifecycle)</a><br />
This version of UI Benchmark tracks performance regressions in Inferno's lifecycle process. Do not write code like this.<br />
<small><a href="uibench-lifecycle/index.html">Example</a> | <a href="https://github.com/infernojs/inferno/blob/master/docs/uibench-lifecycle/app.js">View source...</a></small>
</p>
<p>
<a href="uibench-reactlike/index.html">UI Benchmark (same as React)</a><br />
This is InfernoJS implementation of UI Benchmark using identical application level code with React implementation.<br />
Expand Down
2 changes: 1 addition & 1 deletion docs/math-elements/dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/svg/dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/uibench-inferno-compat/dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/uibench-normalization/dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/uibench-reactlike/dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/uibench/dist/bundle.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions documentation/v9-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Inferno v9 requires following features to be present in the executing runtime:

- `Promise`
- `String.prototype.includes()`
- `String.prototype.startsWith()`
- `Array.prototype.includes()`
- `Object.spread()`

Expand Down
6 changes: 3 additions & 3 deletions fixtures/browser/karma.babel.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ module.exports = function (config) {
postDetection(browserList) {
const results = [];

if (browserList.indexOf('Chrome') > -1) {
if (browserList.includes('Chrome')) {
results.push('Chrome');
}

if (browserList.indexOf('Firefox') > -1) {
if (browserList.includes('Firefox')) {
results.push('Firefox');
}

if (browserList.indexOf('Edge') > -1) {
if (browserList.includes('Edge')) {
results.push('Edge');
}

Expand Down
6 changes: 3 additions & 3 deletions fixtures/browser/karma.swc.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ module.exports = function (config) {
postDetection(browserList) {
const results = [];

if (browserList.indexOf('Chrome') > -1) {
if (browserList.includes('Chrome')) {
results.push('Chrome');
}

if (browserList.indexOf('Firefox') > -1) {
if (browserList.includes('Firefox')) {
results.push('Firefox');
}

if (browserList.indexOf('Edge') > -1) {
if (browserList.includes('Edge')) {
results.push('Edge');
}

Expand Down
6 changes: 3 additions & 3 deletions fixtures/browser/karma.ts.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ module.exports = function (config) {
postDetection(browserList) {
const results = [];

if (browserList.indexOf('Chrome') > -1) {
if (browserList.includes('Chrome')) {
results.push('Chrome');
}

if (browserList.indexOf('Firefox') > -1) {
if (browserList.includes('Firefox')) {
results.push('Firefox');
}

if (browserList.indexOf('Edge') > -1) {
if (browserList.includes('Edge')) {
results.push('Edge');
}

Expand Down
13 changes: 0 additions & 13 deletions fixtures/browser/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a1c6997

Please sign in to comment.