Skip to content

Commit fcacb50

Browse files
authored
Merge pull request #437 from sheepzh/main
v3.3.4
2 parents 847f99b + b67db91 commit fcacb50

File tree

298 files changed

+1991
-1712
lines changed

Some content is hidden

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

298 files changed

+1991
-1712
lines changed

.commitlintrc.ts

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import {
2+
RuleConfigCondition,
3+
RuleConfigSeverity,
4+
TargetCaseType
5+
} from "@commitlint/types"
6+
7+
export default {
8+
rules: {
9+
"body-leading-blank": [RuleConfigSeverity.Error, "always"] as const,
10+
"body-max-line-length": [RuleConfigSeverity.Error, "always", 100] as const,
11+
"footer-leading-blank": [RuleConfigSeverity.Warning, "never"] as const,
12+
"footer-max-line-length": [
13+
RuleConfigSeverity.Error,
14+
"always",
15+
100,
16+
] as const,
17+
"header-max-length": [RuleConfigSeverity.Error, "always", 100] as const,
18+
"header-trim": [RuleConfigSeverity.Error, "always"] as const,
19+
"subject-case": [
20+
RuleConfigSeverity.Error,
21+
"never",
22+
["sentence-case", "start-case", "pascal-case", "upper-case"],
23+
] as [RuleConfigSeverity, RuleConfigCondition, TargetCaseType[]],
24+
"subject-empty": [RuleConfigSeverity.Error, "never"] as const,
25+
"subject-full-stop": [RuleConfigSeverity.Error, "never", "."] as const,
26+
"type-case": [RuleConfigSeverity.Error, "always", "lower-case"] as const,
27+
"type-empty": [RuleConfigSeverity.Error, "never"] as const,
28+
"type-enum": [
29+
RuleConfigSeverity.Error,
30+
"always",
31+
[
32+
"build",
33+
"chore",
34+
"ci",
35+
"docs",
36+
"feat",
37+
"fix",
38+
"perf",
39+
"refactor",
40+
"revert",
41+
"style",
42+
"test",
43+
],
44+
] satisfies [RuleConfigSeverity, RuleConfigCondition, string[]],
45+
},
46+
prompt: {},
47+
}

.github/workflows/publish.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Publish to extension/addon store
2+
on:
3+
push:
4+
branches:
5+
- "release"
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Install dependencies
12+
uses: actions/setup-node@v1
13+
with:
14+
node-version: "v20.11.0"
15+
- run: npm install
16+
- name: Build for MV3
17+
run: npm run build
18+
- name: Build for Firefox
19+
run: npm run build:firefox
20+
- name: Upload to chrome webstore
21+
uses: mnao305/chrome-extension-upload@v5.0.0
22+
with:
23+
file-path: market_packages/target.zip
24+
extension-id: dkdhhcbjijekmneelocdllcldcpmekmm
25+
client-id: ${{ secrets.CHROME_CLIENT_ID }}
26+
client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
27+
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
28+
# publish: false # Not to publish
29+
- name: Upload to Edge addon store
30+
uses: wdzeng/edge-addon@v2
31+
with:
32+
zip-path: market_packages/target.zip
33+
product-id: 2a99ae83-5ec8-4ad2-aa63-9a276fc708ce
34+
client-id: ${{ secrets.EDGE_CLIENT_ID }}
35+
api-key: ${{ secrets.EDGE_API_KEY}}
36+
upload-only: true # Not to publish
37+
- name: Upload to Firefox addon store
38+
uses: cardinalby/webext-buildtools-firefox-addons-action@v1
39+
with:
40+
extensionId: '{7b312f5e-9680-436b-acc1-9b09f60e8aaa}'
41+
zipFilePath: market_packages/target.firefox.zip
42+
jwtIssuer: ${{ secrets.FIREFOX_API_KEY }}
43+
jwtSecret: ${{ secrets.FIREFOX_API_SECRET }}

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx --no -- commitlint --edit $1

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"webtime",
4747
"wfhg",
4848
"zcvf",
49+
"Zhang",
4950
"zrender"
5051
],
5152
"cSpell.ignorePaths": [

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,18 @@ All notable changes to Time Tracker will be documented in this file.
44

55
It is worth mentioning that the release time of each change refers to the time when the installation package is submitted to the webstore. It is about one week for Edge to moderate packages, while only 1-2 days for Chrome and Firefox.
66

7+
## [3.3.4] - 2025-03-26
8+
9+
- Fixed some bugs
10+
11+
## [3.3.3] - 2025-03-22
12+
13+
- Fixed can't modify the name of site
14+
715
## [3.3.2] - 2025-03-20
816

917
- Fixed Reddit not blocked correctly
1018

11-
1219
## [3.3.1] - 2025-03-16
1320

1421
- Modified the English name of the extension

jest.config.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,20 @@ const sourcePattern = /^(.*)\/\*$/
99
const moduleNameMapper: { [key: string]: string } = {}
1010

1111
Object.entries(paths).forEach(([alias, sourceArr]) => {
12-
if (!aliasPattern.test(alias)) {
12+
const aliasMatch = alias.match(aliasPattern)
13+
if (!aliasMatch) {
1314
return
1415
}
15-
if (sourceArr.length !== 1 || !sourcePattern.test(sourceArr[0])) {
16+
if (sourceArr.length !== 1) {
1617
return
1718
}
18-
const prefix = alias.match(aliasPattern)[1]
19+
const sourceMath = sourceArr[0]?.match(sourcePattern)
20+
if (!sourceMath) {
21+
return
22+
}
23+
const prefix = aliasMatch[1]
1924
const pattern = `^${prefix}/(.*)$`
20-
const source = sourceArr[0].match(sourcePattern)[1]
25+
const source = sourceMath[1]
2126
const sourcePath = `<rootDir>/${source}/$1`
2227
moduleNameMapper[pattern] = sourcePath
2328
})

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "timer",
3-
"version": "3.3.2",
3+
"version": "3.3.4",
44
"description": "Time tracker",
55
"homepage": "https://www.wfhg.cc",
66
"scripts": {
@@ -15,7 +15,8 @@
1515
"analyze": "webpack --config=webpack/webpack.analyze.ts",
1616
"test": "jest --env=jsdom test/",
1717
"test-c": "jest --coverage --reporters=jest-junit --env=jsdom test/",
18-
"test-e2e": "jest test-e2e/ --runInBand"
18+
"test-e2e": "jest test-e2e/ --runInBand",
19+
"prepare": "husky"
1920
},
2021
"author": {
2122
"name": "zhy",
@@ -33,7 +34,7 @@
3334
"@rsdoctor/webpack-plugin": "^1.0.0",
3435
"@swc/core": "^1.11.11",
3536
"@swc/jest": "^0.2.37",
36-
"@types/chrome": "0.0.310",
37+
"@types/chrome": "0.0.312",
3738
"@types/decompress": "^4.2.7",
3839
"@types/echarts": "^5.0.0",
3940
"@types/generate-json-webpack-plugin": "^0.3.7",
@@ -43,13 +44,15 @@
4344
"@types/webpack": "^5.28.5",
4445
"@vue/babel-plugin-jsx": "^1.4.0",
4546
"babel-loader": "^10.0.0",
47+
"commitlint": "^19.8.0",
4648
"copy-webpack-plugin": "^13.0.0",
4749
"css-loader": "^7.1.2",
4850
"decompress": "^4.2.1",
4951
"eslint": "^9.22.0",
5052
"filemanager-webpack-plugin": "^8.0.0",
5153
"generate-json-webpack-plugin": "^2.0.0",
5254
"html-webpack-plugin": "^5.6.3",
55+
"husky": "^9.1.7",
5356
"jest": "^29.7.0",
5457
"jest-environment-jsdom": "^29.7.0",
5558
"jest-junit": "^16.0.0",
@@ -75,7 +78,7 @@
7578
"@vueuse/core": "^13.0.0",
7679
"countup.js": "^2.8.0",
7780
"echarts": "^5.6.0",
78-
"element-plus": "2.9.6",
81+
"element-plus": "2.9.7",
7982
"js-base64": "^3.7.7",
8083
"punycode": "^2.3.1",
8184
"stream-browserify": "^3.0.0",

0 commit comments

Comments
 (0)