Skip to content

Commit 1ad4167

Browse files
committed
v1886: v0.7.10
2 parents 30f7860 + 464fe2a commit 1ad4167

190 files changed

Lines changed: 4099 additions & 3046 deletions

File tree

Some content is hidden

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

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ charset = utf-8
88
trim_trailing_whitespace = true
99
insert_final_newline = true
1010

11-
[{*.json,*.min.js,build/**}]
11+
[{**/*.json,**/*.min.js,build/**}]
1212
insert_final_newline = false
1313

1414
[*.md]

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
# Set GitHub linguist exclusion
66
lib/**/*.js linguist-vendored
7-
lib/optimizer/**/*.mjs linguist-vendored
7+
lib/optimizer/**/*.js linguist-vendored
88
lib/nlopt/* linguist-vendored
99
src/log/*.md linguist-detectable=true

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ coverage/
2323
# My own notes
2424
NOTE.md
2525

26+
# This is private for now
27+
CLAUDE.md
28+
2629
# Exported test project
2730
/export*.bps
2831

.mocharc.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
],
88
"timeout": "0",
99
"require": [
10-
"./test/mocha.env.mjs",
11-
"ts-node/register",
12-
"tsconfig-paths/register",
10+
"./test/mocha.env.js",
11+
"@hyperse/ts-node/register",
1312
"./test/utils/line.ts",
1413
"./test/utils/path.ts"
1514
]

.nycrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
22
"check-coverage": true,
3+
"exclude": [
4+
"lib/**",
5+
"test/**"
6+
],
37
"branches": 95,
48
"lines": 95,
59
"functions": 95,

.vscode/settings.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,10 @@
120120
".gitignore": ".gitattributes",
121121
".mocharc.json": ".nycrc",
122122
".stylelintrc.json": ".stylelintignore",
123-
"Pipfile": "Pipfile.lock, pyproject.toml, .pylintrc",
124123
"README.md": "LICENSE.md, CONTRIBUTING.md",
125-
"eslint.config.mjs": ".editorconfig, eslint-local-rules.js",
124+
"eslint.config.js": ".editorconfig",
126125
"makefile": ".clang-*",
127-
"package.json": "pnpm-lock.yaml, .npmrc, .browserslistrc",
128-
"rsbuild.config.ts": "rsbuild.*"
126+
"package.json": "pnpm-lock.yaml, .npmrc, .browserslistrc, knip.config.ts"
129127
},
130128
"files.associations": {
131129
"*.bps": "json",
@@ -160,6 +158,9 @@
160158
],
161159
"javascript.suggestionActions.enabled": false, // See https://github.com/Microsoft/vscode/issues/47299
162160
"mochaExplorer.multiFileSuites": true,
161+
"mochaExplorer.nodeArgv": [
162+
"--enable-source-maps"
163+
],
163164
"scss.validate": false,
164165
"stylelint.packageManager": "pnpm",
165166
"stylelint.validate": [

e2e/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class StudioPage {
3434
public async initialized(): Promise<void> {
3535
const menu = this.page.getByRole("menubar");
3636
await expect(menu).toBeInViewport();
37-
await expect(menu.getByRole("menuitem").first()).not.toBeDisabled();
37+
await expect(menu.getByRole("menuitem").first()).toBeEnabled();
3838
}
3939

4040
/** Create a new project and wait for the workspace to be ready. */
Lines changed: 19 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,38 @@
11
import { defineConfig } from "eslint/config";
22
import pluginCompat from "eslint-plugin-compat";
33
import pluginJsDoc from "eslint-plugin-jsdoc";
4-
import pluginMocha from "eslint-plugin-mocha";
54
import { createConfig, legacyPlugin } from "@mutsuntsai/eslint";
65

76
export default defineConfig([
87
...createConfig({
9-
ignores: ["{build,coverage}/**", "lib/**/*.js", "lib/optimizer/**/*.mjs", "src/app/gen/**"],
10-
import: ["**/*.{ts,vue}", "eslint.config.mjs"],
11-
project: [
12-
"src/app",
13-
"src/client",
14-
"src/core",
15-
"src/other/donate",
16-
"src/other/service",
17-
"test",
18-
"e2e",
19-
"tools",
20-
],
8+
ignores: ["{build,coverage}/**", "lib/{lzma,optimizer}/**/*.js"],
9+
import: {
10+
files: ["**/*.{ts,vue}", "eslint.config.js"],
11+
project: [
12+
"src/app",
13+
"src/client",
14+
"src/core",
15+
"src/other/donate",
16+
"src/other/service",
17+
"test",
18+
"e2e",
19+
"tools",
20+
],
21+
},
2122
globals: {
22-
cjs: ["gulpfile.js", "gulp/**"],
23-
esm: ["test/mocha.env.mjs", "lib/**/*.mjs", "eslint.config.mjs"],
23+
esm: ["test/mocha.env.js", "lib/**/*.js", "eslint.config.js", "gulpfile.js", "gulp/**"],
2424
browser: ["src/**"],
2525
},
2626
html: {
27-
"@typescript-eslint/no-magic-numbers": "off",
28-
"@typescript-eslint/no-this-alias": "off",
29-
"@typescript-eslint/no-unused-vars": "off",
3027
"max-lines-per-function": "off",
3128
"no-invalid-this": "off",
29+
"no-unused-vars": "off",
3230
"no-var": "off",
3331
"vars-on-top": "off",
3432
},
33+
mocha: ["test/**"],
34+
playwright: ["e2e/**"],
35+
package: order => order.toSpliced(order.indexOf("version") + 1, 0, "app_version"),
3536
}),
3637

3738
/////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -95,39 +96,6 @@ export default defineConfig([
9596
},
9697
},
9798

98-
/////////////////////////////////////////////////////////////////////////////////////////////////////
99-
// Tests
100-
/////////////////////////////////////////////////////////////////////////////////////////////////////
101-
102-
{
103-
...pluginMocha.configs.recommended,
104-
files: ["test/**"],
105-
},
106-
{
107-
name: "General Tests",
108-
files: ["{test,e2e,tools}/**"],
109-
rules: {
110-
"@typescript-eslint/explicit-function-return-type": ["warn", {
111-
allowFunctionsWithoutTypeParameters: true,
112-
}],
113-
"@typescript-eslint/no-invalid-this": "off",
114-
"@typescript-eslint/no-magic-numbers": "off",
115-
"@typescript-eslint/no-unused-expressions": "off",
116-
"max-classes-per-file": "off",
117-
"max-lines-per-function": "off",
118-
"prefer-arrow-callback": "off",
119-
},
120-
},
121-
{
122-
name: "Mocha",
123-
files: ["test/**"],
124-
rules: {
125-
"mocha/prefer-arrow-callback": "warn",
126-
"mocha/no-exports": "off",
127-
"mocha/no-pending-tests": "off",
128-
},
129-
},
130-
13199
/////////////////////////////////////////////////////////////////////////////////////////////////////
132100
// Specific scopes
133101
/////////////////////////////////////////////////////////////////////////////////////////////////////

gulp/tasks/ftp.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
const gulp = require("gulp");
2-
const through2 = require("gulp-through2");
3-
const { createHash } = require("node:crypto");
4-
const { existsSync, readFileSync, writeFileSync } = require("fs");
1+
import { existsSync, readFileSync, writeFileSync } from "node:fs";
2+
import { createHash } from "node:crypto";
3+
import gulp from "gulp";
4+
import through2 from "gulp-through2";
55

6-
const config = require("../config.json");
7-
const seriesIf = require("../utils/seriesIf");
6+
import config from "../config.json" with { type: "json" };
7+
import seriesIf from "../utils/seriesIf.js";
88

99
// This file is not in the repo, of course
1010
const ftpConfigPath = process.cwd() + "/.vscode/ftp.json";
1111

1212
/** @type {import("../../.vscode/ftp.json")} */
13-
const ftpConfig = existsSync(ftpConfigPath) ? require(ftpConfigPath) : null;
13+
const ftpConfig = existsSync(ftpConfigPath) ? JSON.parse(readFileSync(ftpConfigPath, "utf-8")) : null;
1414

1515
function configGuard() {
1616
if(!ftpConfig) throw new Error("The repo is not configured with FTP. This operation is for maintainers only.");
@@ -39,9 +39,9 @@ function compare(findCacheDirectory, tag) {
3939
});
4040
}
4141

42-
function connect() {
43-
const ftp = require("vinyl-ftp");
44-
const log = require("fancy-log");
42+
async function connect() {
43+
const ftp = (await import("vinyl-ftp")).default;
44+
const log = (await import("fancy-log")).default;
4545
const options = ftpConfig.server;
4646
options.log = log;
4747
return ftp.create(options);
@@ -50,8 +50,8 @@ function connect() {
5050
/**
5151
* @param {string} folder
5252
*/
53-
function cleanFactory(folder) {
54-
const conn = connect();
53+
async function cleanFactory(folder) {
54+
const conn = await connect();
5555
return conn.clean(`/public_html/${folder}/**/*.*`, config.dest.dist);
5656
}
5757

@@ -71,7 +71,7 @@ function streamToPromise(stream) {
7171
*/
7272
async function ftpFactory(folder, pipeFactory) {
7373
const findCacheDirectory = (await import("find-cache-directory")).default;
74-
const conn = connect();
74+
const conn = await connect();
7575
const sw = config.dest.dist + "/sw.js";
7676
const globs = [
7777
config.dest.dist + "/**/*",

gulp/tasks/locale.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const gulp = require("gulp");
2-
const through2 = require("gulp-through2");
1+
import gulp from "gulp";
2+
import through2 from "gulp-through2";
33

4-
const config = require("../config.json");
4+
import config from "../config.json" with { type: "json" };
55

66
function copyInOrderOf(source, ref) {
77
if(typeof source != "object" || Array.isArray(source)) return source;

0 commit comments

Comments
 (0)