10 Commits

Author SHA1 Message Date
Sonny
7fefabd9bf chore: release v3.1.2 2025-07-05 17:01:13 +02:00
Sonny
6e2d3d8c7a chore: remove useless vscode extensions recommendations 2025-07-05 16:58:39 +02:00
Sonny
99759a85d1 chore: change eslint rules to ignore file name casing warning 2025-07-05 16:57:47 +02:00
Sonny
3d88bcaa48 chore: remove pgadmin 2025-07-05 15:50:07 +02:00
Sonny
15e580942c chore(deps): upgrade node version from 22.11 to 24.1 2025-07-05 15:49:59 +02:00
Sonny
8efa281a48 chore(deps): use vite rolldown 2025-07-05 15:08:40 +02:00
Sonny
2dd96ff647 chore(deps): update deps 2025-07-05 15:03:44 +02:00
Sonny
c54c1cc3da chore(deps): update deps 2025-04-03 15:46:05 +02:00
Sonny
af08964fcc chore: release v3.1.1 2025-01-21 18:16:03 +01:00
Sonny
151ac0602a fix: "cannot remove collection" related to unused stuff 2025-01-21 18:15:08 +01:00
23 changed files with 3387 additions and 3569 deletions

View File

@@ -13,7 +13,7 @@ storage
# Additional good to have ignores for dockerignore
Dockerfile*
docker-compose*
compose*
.dockerignore
*.md
.git

View File

@@ -10,12 +10,5 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.json]
insert_final_newline = unset
[**.min.js]
indent_style = unset
insert_final_newline = unset
[*.md]
trim_trailing_whitespace = false

View File

@@ -1,9 +1,6 @@
{
"hooks": {
"before:init": [
"pnpm format",
"pnpm lint"
]
"before:init": ["pnpm lint", "pnpm run typecheck"]
},
"git": {
"commitMessage": "chore: release v${version}",
@@ -17,4 +14,4 @@
"npm": {
"publish": false
}
}
}

View File

@@ -1,3 +0,0 @@
{
"recommendations": ["vunguyentuan.vscode-css-variables"]
}

View File

@@ -7,7 +7,7 @@
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"*.js": "${capture}.js.map, ${capture}.min.js, ${capture}.d.ts",
"package.json": "pnpm-lock.yaml, tsconfig.json, eslint.config.js, .babelrc, vite.config.ts, .editorconfig",
"package.json": "pnpm-lock.yaml, pnpm-workspace.yaml, tsconfig.json, eslint.config.js, .babelrc, vite.config.ts, .editorconfig",
"Makefile": "*compose.yml, Dockerfile, servers_pgadmin.json, .dockerignore"
},
"cssVariables.lookupFiles": [
@@ -17,4 +17,4 @@
"**/*.less",
"node_modules/@mantine/core/styles.css"
]
}
}

View File

@@ -1,6 +1,6 @@
# Source : https://github.com/adonisjs-community/adonis-packages/blob/main/Dockerfile
FROM node:22.11-alpine3.20 AS base
FROM node:24.1-alpine3.20 AS base
RUN apk --no-cache add curl
RUN corepack enable

View File

@@ -15,9 +15,6 @@ export default class Collection extends AppBaseModel {
@column()
declare visibility: Visibility;
@column()
declare nextId: number;
@column()
declare authorId: number;

View File

@@ -6,7 +6,6 @@ export const createCollectionValidator = vine.compile(
name: vine.string().trim().minLength(1).maxLength(254),
description: vine.string().trim().maxLength(254).nullable(),
visibility: vine.enum(Visibility),
nextId: vine.number().optional(),
})
);

View File

@@ -7,7 +7,6 @@ export const updateCollectionValidator = vine.compile(
name: vine.string().trim().minLength(1).maxLength(254),
description: vine.string().trim().maxLength(254).nullable(),
visibility: vine.enum(Visibility),
nextId: vine.number().optional(),
params,
})

View File

@@ -15,33 +15,6 @@ services:
ports:
- '${DB_PORT}:5432'
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4:8
restart: always
entrypoint: /bin/sh -c "chmod 0600 /pgpass; /entrypoint.sh;"
healthcheck:
test: ['CMD', 'wget', '-O', '-', 'http://localhost:80/misc/ping']
interval: 2s
timeout: 10s
retries: 30
env_file: .env
environment:
- PGADMIN_DEFAULT_EMAIL=myemail@gmail.com
- PGADMIN_DEFAULT_PASSWORD=a12345678
- PGADMIN_CONFIG_SERVER_MODE=False
- PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED=False
depends_on:
- postgres
ports:
- '5050:80'
user: root
configs:
- source: servers.json
target: /pgadmin4/servers.json
- source: pgpass
target: /pgpass
my-links:
container_name: my-links
restart: always
@@ -61,19 +34,3 @@ services:
volumes:
postgres-volume:
configs:
pgpass:
content: postgres:${DB_PORT}:*:${DB_USER}:${DB_PASSWORD}
servers.json:
content: |
{"Servers": {"1": {
"Group": "Servers",
"Name": "project",
"Host": "postgres",
"Port": ${DB_PORT},
"MaintenanceDB": "${DB_DATABASE}",
"Username": "${DB_USER}",
"PassFile": "/pgpass",
"SSLMode": "prefer"
}}}

View File

@@ -0,0 +1,21 @@
import { BaseSchema } from '@adonisjs/lucid/schema';
export default class extends BaseSchema {
protected tableName = 'collections';
async up() {
this.schema.alterTable('collections', (table) => {
table.dropColumn('next_id');
});
}
async down() {
this.schema.alterTable('collections', (table) => {
table
.integer('next_id')
.references('id')
.inTable('collections')
.defaultTo(null);
});
}
}

View File

@@ -34,7 +34,6 @@ function createRandomCollection(userIds: User['id'][]) {
name: faker.string.alphanumeric({ length: { min: 5, max: 25 } }),
description: faker.string.alphanumeric({ length: { min: 0, max: 254 } }),
visibility: Visibility.PRIVATE,
nextId: collectionId + 1,
authorId,
};
}

View File

@@ -15,48 +15,5 @@ services:
ports:
- "${DB_PORT}:5432"
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4:8
restart: always
entrypoint: /bin/sh -c "chmod 0600 /pgpass; /entrypoint.sh;"
healthcheck:
test: ["CMD", "wget", "-O", "-", "http://localhost:80/misc/ping"]
interval: 2s
timeout: 10s
retries: 30
env_file: .env
environment:
- PGADMIN_DEFAULT_EMAIL=myemail@gmail.com
- PGADMIN_DEFAULT_PASSWORD=a12345678
- PGADMIN_CONFIG_SERVER_MODE=False
- PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED=False
depends_on:
- postgres
ports:
- "5050:80"
user: root
configs:
- source: servers.json
target: /pgadmin4/servers.json
- source: pgpass
target: /pgpass
volumes:
postgres-volume:
configs:
pgpass:
content: postgres:${DB_PORT}:*:${DB_USER}:${DB_PASSWORD}
servers.json:
content: |
{"Servers": {"1": {
"Group": "Servers",
"Name": "project",
"Host": "postgres",
"Port": ${DB_PORT},
"MaintenanceDB": "${DB_DATABASE}",
"Username": "${DB_USER}",
"PassFile": "/pgpass",
"SSLMode": "prefer"
}}}

View File

@@ -1,4 +1,7 @@
import { configApp } from '@adonisjs/eslint-config';
export default configApp({
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
rules: {
'unicorn/filename-case': 'off',
},
});

View File

@@ -3,13 +3,12 @@ import { FormEvent } from 'react';
import { useTranslation } from 'react-i18next';
import BackToDashboard from '~/components/common/navigation/back_to_dashboard';
import { FormLayout, FormLayoutProps } from '~/layouts/form_layout';
import { Collection, Visibility } from '~/types/app';
import { Visibility } from '~/types/app';
export type FormCollectionData = {
name: string;
description: string | null;
visibility: Visibility;
nextId?: Collection['id'];
};
interface FormCollectionProps extends FormLayoutProps {

View File

@@ -18,7 +18,6 @@ export default function EditCollectionPage({
name: collection.name,
description: collection.description,
visibility: collection.visibility,
nextId: collection.nextId,
});
const canSubmit = useMemo<boolean>(() => {
const trimmedName = data.name.trim();

View File

@@ -74,6 +74,7 @@ export const useFavorites = () =>
);
export function useCollectionsSetter() {
// eslint-disable-next-line @typescript-eslint/naming-convention
const { _setCollections, setActiveCollection } = useCollectionStore();
return { _setCollections, setActiveCollection };
}

View File

@@ -49,7 +49,6 @@ export type Collection = CommonBase & {
name: string;
description: string | null;
visibility: Visibility;
nextId: number;
authorId: number;
};

View File

@@ -1,6 +1,6 @@
{
"name": "my-links",
"version": "3.1.0",
"version": "3.1.2",
"type": "module",
"license": "GPL-3.0-only",
"scripts": {
@@ -11,6 +11,7 @@
"lint": "eslint . --report-unused-disable-directives --max-warnings 0",
"format": "prettier --write --parser typescript '**/*.{ts,tsx}'",
"typecheck": "tsc --noEmit",
"check": "pnpm run lint && pnpm run typecheck",
"prepare": "husky",
"release": "release-it",
"generate-icons": "pwa-assets-generator"
@@ -35,68 +36,68 @@
},
"devDependencies": {
"@adonisjs/assembler": "^7.8.2",
"@adonisjs/eslint-config": "2.0.0-beta.6",
"@adonisjs/prettier-config": "^1.4.0",
"@adonisjs/tsconfig": "^1.4.0",
"@faker-js/faker": "^9.3.0",
"@japa/assert": "^4.0.0",
"@japa/plugin-adonisjs": "^3.0.1",
"@japa/runner": "^3.1.4",
"@swc/core": "^1.10.4",
"@types/luxon": "^3.4.2",
"@types/node": "^22.10.4",
"@types/react": "^19.0.2",
"@types/react-dom": "^19.0.2",
"@typescript-eslint/eslint-plugin": "^8.19.0",
"@vite-pwa/assets-generator": "^0.2.6",
"@vitejs/plugin-react": "^4.3.4",
"eslint": "^9.17.0",
"@adonisjs/eslint-config": "2.1.0",
"@adonisjs/prettier-config": "^1.4.5",
"@adonisjs/tsconfig": "^1.4.1",
"@faker-js/faker": "^9.9.0",
"@japa/assert": "^4.0.1",
"@japa/plugin-adonisjs": "^4.0.0",
"@japa/runner": "^4.2.0",
"@swc/core": "^1.12.9",
"@types/luxon": "^3.6.2",
"@types/node": "^24.0.10",
"@types/react": "^19.1.8",
"@types/react-dom": "^19.1.6",
"@typescript-eslint/eslint-plugin": "^8.35.1",
"@vite-pwa/assets-generator": "^1.0.0",
"eslint": "^9.30.1",
"hot-hook": "^0.4.0",
"husky": "^9.1.7",
"lint-staged": "^15.3.0",
"lint-staged": "^16.1.2",
"pino-pretty": "^13.0.0",
"postcss": "^8.4.49",
"postcss-preset-mantine": "^1.17.0",
"postcss": "^8.5.6",
"postcss-preset-mantine": "^1.18.0",
"postcss-simple-vars": "^7.0.1",
"prettier": "^3.4.2",
"release-it": "^17.11.0",
"ts-node-maintained": "^10.9.4",
"typescript": "~5.7.2",
"vite": "^6.0.6"
"prettier": "^3.6.2",
"release-it": "^19.0.3",
"ts-node-maintained": "^10.9.5",
"typescript": "~5.8.3",
"vite": "^7.0.2"
},
"dependencies": {
"@adonisjs/ally": "^5.0.2",
"@adonisjs/auth": "^9.3.0",
"@adonisjs/core": "^6.17.0",
"@adonisjs/ally": "^5.1.0",
"@adonisjs/auth": "^9.4.0",
"@adonisjs/core": "^6.19.0",
"@adonisjs/cors": "^2.2.1",
"@adonisjs/inertia": "^2.1.2",
"@adonisjs/lucid": "^21.6.0",
"@adonisjs/session": "^7.5.0",
"@adonisjs/shield": "^8.1.1",
"@adonisjs/inertia": "^3.1.1",
"@adonisjs/lucid": "^21.7.0",
"@adonisjs/session": "^7.5.1",
"@adonisjs/shield": "^8.2.0",
"@adonisjs/static": "^1.1.1",
"@adonisjs/vite": "^4.0.0",
"@inertiajs/react": "^2.0.0",
"@inertiajs/react": "^2.0.14",
"@izzyjs/route": "^1.2.0",
"@mantine/core": "^7.15.2",
"@mantine/hooks": "^7.15.2",
"@mantine/spotlight": "^7.15.2",
"@vinejs/vine": "^3.0.0",
"bentocache": "^1.0.0-beta.9",
"@mantine/core": "^8.1.2",
"@mantine/hooks": "^8.1.2",
"@mantine/spotlight": "^8.1.2",
"@vinejs/vine": "^3.0.1",
"@vitejs/plugin-react-oxc": "^0.2.3",
"bentocache": "^1.4.0",
"dayjs": "^1.11.13",
"edge.js": "^6.2.0",
"i18next": "^24.2.0",
"edge.js": "^6.2.1",
"i18next": "^25.3.1",
"knex": "^3.1.0",
"luxon": "^3.5.0",
"luxon": "^3.6.1",
"node-html-parser": "^7.0.1",
"pg": "^8.13.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-hotkeys-hook": "^4.6.1",
"react-i18next": "^15.4.0",
"react-icons": "^5.4.0",
"pg": "^8.16.3",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react-hotkeys-hook": "^5.1.0",
"react-i18next": "^15.6.0",
"react-icons": "^5.5.0",
"reflect-metadata": "^0.2.2",
"vite-plugin-pwa": "^0.21.1",
"zustand": "^5.0.2"
"vite-plugin-pwa": "^1.0.1",
"zustand": "^5.0.6"
},
"hotHook": {
"boundaries": [
@@ -118,6 +119,11 @@
"*.js,*.ts,*.jsx,*.tsx": "eslint --cache --fix"
},
"volta": {
"node": "22.11.0"
"node": "24.1.0"
},
"pnpm": {
"overrides": {
"vite": "npm:rolldown-vite@latest"
}
}
}

6694
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

4
pnpm-workspace.yaml Normal file
View File

@@ -0,0 +1,4 @@
onlyBuiltDependencies:
- '@swc/core'
- esbuild
- sharp

View File

@@ -1,3 +1,4 @@
/* eslint-disable @unicorn/filename-case */
import {
defineConfig,
minimal2023Preset as preset,

View File

@@ -2,7 +2,7 @@ import project from '#config/project';
import { getDirname } from '@adonisjs/core/helpers';
import inertia from '@adonisjs/inertia/client';
import adonisjs from '@adonisjs/vite/client';
import react from '@vitejs/plugin-react';
import react from '@vitejs/plugin-react-oxc';
import { defineConfig } from 'vite';
import { VitePWA } from 'vite-plugin-pwa';
@@ -101,7 +101,7 @@ export default defineConfig({
inertia({ ssr: { enabled: true, entrypoint: 'inertia/app/ssr.tsx' } }),
react(),
adonisjs({
entrypoints: ['inertia/app/app.tsx'],
entrypoints: [`${getDirname(import.meta.url)}/inertia/app/app.tsx`],
reload: ['resources/views/**/*.edge'],
}),
],