Skip to content

Commit

Permalink
Added function to shorten links longer than 40 characters. Added proo…
Browse files Browse the repository at this point in the history
…f of concept for human friendly dates in the UI (#609). Added a setting, which helps to hide todos by prepending a prefix to the beginning of the line (#660).
  • Loading branch information
ransome1 committed Feb 23, 2024
1 parent df5f663 commit c0e7d28
Show file tree
Hide file tree
Showing 24 changed files with 807 additions and 715 deletions.
38 changes: 18 additions & 20 deletions .github/workflows/code-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,25 @@ jobs:
snyk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: npm install
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
- uses: actions/checkout@master
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
njsscan:
needs: snyk
name: njsscan
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v3
uses: actions/checkout@master
- name: nodejsscan scan
id: njsscan
uses: ajinabraham/njsscan-action@master
with:
args: '. --sarif --output results.sarif || true'
- name: Upload njsscan report
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
codecov:
Expand All @@ -41,16 +39,16 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Set up Node 18
uses: actions/setup-node@v3
- name: Set up latest available Nodejs
uses: actions/setup-node@master
- name: Install dependencies
run: npm install
- name: Build
run: yarn run build
- name: Run tests
run: yarn run test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
codeql:
Expand All @@ -63,26 +61,26 @@ jobs:
language: [ 'javascript' ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node 18
uses: actions/setup-node@v3
uses: actions/checkout@master
- name: Set up latest available Nodejs
uses: actions/setup-node@master
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
mirror:
name: Mirror code to opencode.net
runs-on: ubuntu-latest
needs: codeql
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@master
with:
fetch-depth: 0
- uses: pixta-dev/repository-mirroring-action@v1
- uses: pixta-dev/repository-mirroring-action@master
with:
target_repo_url:
[email protected]:ransome/sleek.git
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Trigger Flathub build
uses: peter-evans/repository-dispatch@v2.1.2
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.TRIGGER_FLATHUB_BUILD }}
repository: ransome1/com.github.ransome1.sleek
Expand All @@ -23,11 +23,11 @@ jobs:
os: [macos-latest]
steps:
- name: Checkout git repo
uses: actions/checkout@v4
uses: actions/checkout@master
- name: Install Node and NPM
uses: actions/setup-node@v3
uses: actions/setup-node@master
with:
node-version: 18
node-version: 20
cache: 'yarn'
- name: Install and build
run: |
Expand All @@ -54,11 +54,11 @@ jobs:
os: [windows-latest]
steps:
- name: Checkout git repo
uses: actions/checkout@v4
uses: actions/checkout@master
- name: Install Node and NPM
uses: actions/setup-node@v3
uses: actions/setup-node@master
with:
node-version: 18
node-version: 20
cache: 'yarn'
- name: Install and build
run: |
Expand All @@ -78,11 +78,11 @@ jobs:
os: [ubuntu-latest]
steps:
- name: Checkout git repo
uses: actions/checkout@v4
uses: actions/checkout@master
- name: Install Node and NPM
uses: actions/setup-node@v3
uses: actions/setup-node@master
with:
node-version: 18
node-version: 20
cache: 'yarn'
- name: Install and build
run: |
Expand Down
2 changes: 1 addition & 1 deletion flatpak/com.github.ransome1.sleek.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<developer_name>Robin Ahle</developer_name>
<content_rating type="oars-1.1"/>
<releases>
<release version="2.0.10-rc.1" date="2024-02-11"/>
<release version="2.0.10-rc.2" date="2024-02-23"/>
</releases>
<url type="homepage">https://github.com/ransome1/sleek</url>
<url type="contact">https://github.com/ransome1/sleek/issues</url>
Expand Down
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sleek",
"version": "2.0.10-rc.1",
"version": "2.0.10-rc.2",
"main": "./src/main/main.tsx",
"scripts": {
"build": "concurrently \"yarn run peggy\" \"yarn run build:main\" \"yarn run build:renderer\"",
Expand All @@ -19,7 +19,7 @@
"mas": "cross-env NODE_ENV=production yarn run build && electron-builder build -m mas --universal --publish never",
"masdev": "cross-env NODE_ENV=production yarn run build && electron-builder build -m mas-dev --universal --publish never",
"dir": "cross-env NODE_ENV=production yarn run build && electron-builder --dir --publish never",
"peggy": "peggy --format es --output ./src/main/modules/Filters/FilterLang.js ./src/main/modules/Filters/FilterLang.pegjs",
"peggy": "peggy -o ./src/main/modules/Filters/FilterLang.js ./src/main/modules/Filters/FilterLang.pegjs",
"depcheck": "depcheck"
},
"browserslist": [],
Expand Down Expand Up @@ -72,13 +72,13 @@
"dependencies": {
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.15.7",
"@mui/material": "^5.15.7",
"@mui/icons-material": "^5.15.10",
"@mui/material": "^5.15.10",
"@mui/system": "^5.15.7",
"@mui/x-date-pickers": "^6.19.3",
"@mui/x-date-pickers": "^6.19.5",
"dayjs": "^1.11.9",
"electron-store": "^8.1.0",
"i18next": "^23.8.2",
"i18next": "^23.10.0",
"jstodotxt": "^1.0.0-alpha.0",
"react": "^18.2.0",
"react-autosuggest": "^10.1.0",
Expand All @@ -91,16 +91,16 @@
"sugar": "^2.0.6"
},
"devDependencies": {
"@electron/notarize": "^2.2.0",
"@electron/notarize": "^2.3.0",
"@electron/rebuild": "^3.2.13",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
"@svgr/webpack": "^8.0.1",
"@teamsupercell/typings-for-css-modules-loader": "^2.5.2",
"@testing-library/jest-dom": "^6.4.1",
"@testing-library/react": "^14.2.1",
"@types/jest": "^29.5.12",
"@types/node": "20.11.17",
"@types/react": "^18.2.52",
"@types/node": "20.11.20",
"@types/react": "^18.2.58",
"@types/react-autosuggest": "^10.1.10",
"@types/react-beautiful-dnd": "^13.1.8",
"@types/react-dom": "^18.2.4",
Expand All @@ -113,25 +113,25 @@
"css-minimizer-webpack-plugin": "^6.0.0",
"depcheck": "^1.4.7",
"detect-port": "^1.5.1",
"electron": "^28.2.1",
"electron-builder": "^24.2.1",
"electron": "28.2.4",
"electron-builder": "^24.12.0",
"electron-devtools-installer": "^3.2.0",
"electronmon": "^2.0.2",
"esbuild": "^0.20.0",
"esbuild": "^0.20.1",
"esbuild-register": "^3.5.0",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.5.1",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"material-ui-popup-state": "^5.0.9",
"mini-css-extract-plugin": "^2.8.0",
"peggy": "^3.0.2",
"peggy": "^4.0.0",
"prettier": "^3.1.1",
"react-refresh": "^0.14.0",
"react-test-renderer": "^18.2.0",
"rimraf": "^5.0.1",
"sass": "^1.69.4",
"sass-loader": "^14.1.0",
"sass": "^1.71.1",
"sass-loader": "^14.1.1",
"style-loader": "^3.3.3",
"terser-webpack-plugin": "^5.3.9",
"ts-jest": "^29.1.0",
Expand All @@ -140,10 +140,10 @@
"tsconfig-paths-webpack-plugin": "^4.0.1",
"typescript": "^5.1.3",
"url-loader": "^4.1.1",
"webpack": "^5.90.1",
"webpack": "^5.90.3",
"webpack-bundle-analyzer": "^4.9.0",
"webpack-cli": "^5.1.1",
"webpack-dev-server": "^4.15.0",
"webpack-dev-server": "^5.0.2",
"webpack-merge": "^5.9.0"
},
"build": {
Expand Down
2 changes: 1 addition & 1 deletion release/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sleek",
"version": "2.0.10-rc.1",
"version": "2.0.10-rc.2",
"description": "todo.txt manager for Linux, Windows and MacOS, free and open-source (FOSS)",
"synopsis": "todo.txt manager for Linux, Windows and MacOS, free and open-source (FOSS)",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: sleek
base: core20
version: "2.0.10-rc.1"
version: "2.0.10-rc.2"
summary: todo.txt manager for Linux, free and open-source (FOSS)
description: |
sleek is an open-source (FOSS) todo manager based on the todo.txt syntax. Stripped down to only the most necessary features, and with a clean and simple interface, sleek aims to help you focus on getting things done.
Expand Down
28 changes: 14 additions & 14 deletions src/__tests__/__mock__/recurrence.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

2024-02-11 Line 1 rec:1d due:2024-02-12
2024-02-11 Line 1 rec:w due:2024-02-18
2024-02-11 Line 1 rec:2m due:2024-04-11
2024-02-11 Line 1 rec:+1d due:2024-02-13
2024-02-11 Line 1 rec:7w due:2024-03-31
2024-02-11 Line 1 due:2023-07-24 rec:+1b
2024-02-11 taxes are due in one year t:2022-03-30 due:2022-04-30 rec:+1y
2024-02-11 Water plants @home +quick due:2024-02-18 t:2024-02-08 rec:1w
2024-02-11 Line 1 rec:+1d t:2023-09-20
2024-02-11 Line 1 rec:1d pri:A due:2024-02-12
2024-02-11 (A) Do something rec:d t:2024-02-12 @SomeContext
2024-02-11 Do something rec:0d
2024-02-11 Do something rec:0d due:2024-02-11
2024-02-11 Do something rec:0d due:2024-02-11 t:2024-02-11
2024-02-23 Line 1 rec:1d due:2024-02-24
2024-02-23 Line 1 rec:w due:2024-03-01
2024-02-23 Line 1 rec:2m due:2024-04-23
2024-02-23 Line 1 rec:+1d due:2024-02-25
2024-02-23 Line 1 rec:7w due:2024-04-12
2024-02-23 Line 1 due:2023-07-24 rec:+1b
2024-02-23 taxes are due in one year t:2022-03-30 due:2022-04-30 rec:+1y
2024-02-23 Water plants @home +quick due:2024-03-01 t:2024-02-20 rec:1w
2024-02-23 Line 1 rec:+1d t:2023-09-20
2024-02-23 Line 1 rec:1d pri:A due:2024-02-24
2024-02-23 (A) Do something rec:d t:2024-02-24 @SomeContext
2024-02-23 Do something rec:0d
2024-02-23 Do something rec:0d due:2024-02-23
2024-02-23 Do something rec:0d due:2024-02-23 t:2024-02-23
1 change: 1 addition & 0 deletions src/__tests__/main/Filters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ describe('Should filter todos based on passed filters', () => {
}
const expected = [
{ id: 1, body: 'Test', created: null, complete: false, completed: null, priority: null, contexts: null, projects: ['Project 1'], due: '2023-01-01', dueString: '2023-01-01', t: null, tString: null, rec: null, hidden: false, pm: null, visible: true, string: '' },
{ id: 2, body: 'Test', created: null, complete: true, completed: null, priority: null, contexts: null, projects: ['Project 2'], due: '2023-02-01', dueString: '2023-02-01', t: null, tString: null, rec: null, hidden: false, pm: null, visible: false, string: '' },
{ id: 3, body: 'Test', created: null, complete: false, completed: null, priority: null, contexts: null, projects: ['Project 1'], due: '2023-03-01', dueString: '2023-03-01', t: null, tString: null, rec: null, hidden: false, pm: null, visible: true, string: '' },
];
const result = applyFilters(todoObjects, filters);
Expand Down
Loading

0 comments on commit c0e7d28

Please sign in to comment.