Skip to content

Commit 7500216

Browse files
authored
Update devDependencies (#708)
* Update devDependencies * Fix Dockerfile * Set timeout of gui-test in command line
1 parent a4e4324 commit 7500216

File tree

146 files changed

+1905
-1793
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+1905
-1793
lines changed

Dockerfile_guitest

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:18.12-slim
1+
FROM node:20.9-slim
22

33
RUN apt-get update \
44
&& apt-get install -y \
@@ -23,6 +23,6 @@ ADD package.json /app
2323
ADD yarn.lock /app
2424
WORKDIR /app
2525

26-
RUN yarn && yarn cache clean
26+
RUN yarn && yarn playwright install chromium && yarn cache clean
2727

2828
ENTRYPOINT ["yarn", "test:gui"]

js/renderer/rl/gomoku.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ class Gomoku extends Game {
128128
winner === GomokuRLEnvironment.BLACK
129129
? 'BLACK WIN'
130130
: winner === GomokuRLEnvironment.WHITE
131-
? 'WHITE WIN'
132-
: 'DRAW'
131+
? 'WHITE WIN'
132+
: 'DRAW'
133133
}
134134
}
135135

js/view/autoencoder.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ var dispAE = function (elm, platform) {
112112
mode === 'AD'
113113
? dispAEad(elm, model, platform)
114114
: mode === 'CT'
115-
? dispAEClt(elm, model, platform)
116-
: dispAEdr(elm, model, platform)
115+
? dispAEClt(elm, model, platform)
116+
: dispAEdr(elm, model, platform)
117117

118118
let rdim = null
119119
if (mode !== 'DR') {

lib/model/nns/layer/isigmoid.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ export default class ImprovedSigmoidLayer extends Layer {
2424
-this._a < v && v < this._a
2525
? 1 / (1 + Math.exp(-v))
2626
: v >= this._a
27-
? sigmap + this._alpha * (v - this._a)
28-
: sigmam + this._alpha * (v + this._a)
27+
? sigmap + this._alpha * (v - this._a)
28+
: sigmam + this._alpha * (v + this._a)
2929
)
3030
return this._o
3131
}

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"lint": "eslint ./lib ./tests",
2121
"check-types": "npm run create-entry && tsc ./lib/**.js ./lib/**/*.js --allowJs --checkJs --target esnext --noEmit --skipLibCheck",
2222
"test:lib": "npm run create-entry && NODE_OPTIONS=--experimental-vm-modules npx jest --testMatch '**/lib/**/?(*.)+(spec|test).[jt]s?(x)' --coverage --coveragePathIgnorePatterns '/node_modules/' 'onnx/onnx_pb.js' --reporters default ./tests/retry-test.js ./tests/slow-test.js --maxWorkers=100% --workerIdleMemoryLimit=100MB",
23-
"test:gui": "NODE_OPTIONS=--experimental-vm-modules npx jest --testMatch '**/gui/**/?(*.)+(spec|test).[jt]s?(x)' --coveragePathIgnorePatterns '/node_modules/' 'onnx/onnx_pb.js' --reporters default ./tests/retry-test.js ./tests/slow-test.js ./tests/gui-coverage-reporter.js --maxWorkers=100% --workerIdleMemoryLimit=100MB",
23+
"test:gui": "NODE_OPTIONS=--experimental-vm-modules npx jest --testMatch '**/gui/**/?(*.)+(spec|test).[jt]s?(x)' --coveragePathIgnorePatterns '/node_modules/' 'onnx/onnx_pb.js' --reporters default ./tests/retry-test.js ./tests/slow-test.js ./tests/gui-coverage-reporter.js --testTimeout=20000 --maxWorkers=100% --workerIdleMemoryLimit=100MB",
2424
"types": "npm run create-entry && find lib -name \\*.d.ts -delete && tsc ./lib/**.js ./lib/**/*.js --declaration --allowJs --emitDeclarationOnly",
2525
"document": "npm run create-entry && documentation build lib/index.js -f html --github -o docs && html-minifier --collapse-whitespace --minify-css true --minify-js true -o ./docs/index.html ./docs/index.html",
2626
"minify": "find . -name \\*.js | grep -E '^./(lib|js)' | xargs -t -P2 -n1 -I% npx terser % -c -m -o % && html-minifier --collapse-whitespace --minify-css true --minify-js true -o ./index.html ./index.html",
@@ -55,18 +55,18 @@
5555
},
5656
"homepage": "https://ai-on-browser.github.io/docs",
5757
"devDependencies": {
58-
"documentation": "^14.0.0",
59-
"eslint": "^8.29.0",
60-
"eslint-config-prettier": "^8.5.0",
61-
"eslint-plugin-jest": "^27.1.6",
62-
"eslint-plugin-jsdoc": "^39.6.4",
58+
"documentation": "^14.0.2",
59+
"eslint": "^8.54.0",
60+
"eslint-config-prettier": "^9.0.0",
61+
"eslint-plugin-jest": "^27.6.0",
62+
"eslint-plugin-jsdoc": "^46.9.0",
6363
"html-minifier": "^4.0.0",
64-
"istanbul-reports": "^3.1.5",
65-
"jest": "^29.3.1",
66-
"playwright": "^1.32.1",
67-
"prettier": "^2.8.1",
68-
"terser": "^5.16.1",
69-
"typescript": "^4.9.4",
70-
"v8-to-istanbul": "^9.1.0"
64+
"istanbul-reports": "^3.1.6",
65+
"jest": "^29.7.0",
66+
"playwright": "^1.40.0",
67+
"prettier": "^3.1.0",
68+
"terser": "^5.24.0",
69+
"typescript": "^5.3.2",
70+
"v8-to-istanbul": "^9.2.0"
7171
}
7272
}

tests/gui/data/air.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ describe('classification', () => {
66
let page
77
beforeEach(async () => {
88
page = await getPage()
9-
}, 10000)
9+
})
1010

1111
afterEach(async () => {
1212
await page?.close()
@@ -23,5 +23,5 @@ describe('classification', () => {
2323
const aiManager = await page.evaluate(getaimanager)
2424
expect(aiManager._datas).toBeDefined()
2525
expect(aiManager._datas.length).toBe(144)
26-
}, 10000)
26+
})
2727
})

tests/gui/data/functional.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ describe('classification', () => {
66
let page
77
beforeEach(async () => {
88
page = await getPage()
9-
}, 10000)
9+
})
1010

1111
afterEach(async () => {
1212
await page?.close()
@@ -28,5 +28,5 @@ describe('classification', () => {
2828
const aiManager = await page.evaluate(getaimanager)
2929
expect(aiManager._datas).toBeDefined()
3030
expect(aiManager._datas._x.length).toBe(100)
31-
}, 10000)
31+
})
3232
})

tests/gui/data/iris.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ describe('classification', () => {
66
let page
77
beforeEach(async () => {
88
page = await getPage()
9-
}, 10000)
9+
})
1010

1111
afterEach(async () => {
1212
await page?.close()
@@ -28,5 +28,5 @@ describe('classification', () => {
2828
const aiManager = await page.evaluate(getaimanager)
2929
expect(aiManager._datas).toBeDefined()
3030
expect(aiManager._datas._x.length).toBe(150)
31-
}, 10000)
31+
})
3232
})

tests/gui/data/statlib.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ describe('classification', () => {
66
let page
77
beforeEach(async () => {
88
page = await getPage()
9-
}, 10000)
9+
})
1010

1111
afterEach(async () => {
1212
await page?.close()
@@ -28,5 +28,5 @@ describe('classification', () => {
2828
const aiManager = await page.evaluate(getaimanager)
2929
expect(aiManager._datas).toBeDefined()
3030
expect(aiManager._datas._x.length).toBe(506)
31-
}, 10000)
31+
})
3232
})

tests/gui/data/upload.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('classification', () => {
2929
const data = dataURL.replace(/^data:image\/\w+;base64,/, '')
3030
const buf = Buffer.from(data, 'base64')
3131
await fs.promises.writeFile('image_upload.png', buf)
32-
}, 10000)
32+
})
3333

3434
afterEach(async () => {
3535
await fs.promises.unlink('image_upload.png')
@@ -46,5 +46,5 @@ describe('classification', () => {
4646
const svg = await page.waitForSelector('#plot-area svg')
4747
await svg.waitForSelector('.points .datas circle')
4848
expect((await svg.$$('.points .datas circle')).length).toBe(1)
49-
}, 10000)
49+
})
5050
})

0 commit comments

Comments
 (0)