lol

Merge pull request #239690 from adisbladis/lemmy-0_18_0

lemmy: 0.17.4 -> 0.18.0

authored by

adisbladis and committed by
GitHub
d76f499f bafe7455

+133 -62
+2
nixos/tests/lemmy.nix
··· 26 26 site_name = "Lemmy FTW"; 27 27 admin_email = "mightyiam@example.com"; 28 28 }; 29 + # https://github.com/LemmyNet/lemmy/blob/50efb1d519c63a7007a07f11cc8a11487703c70d/crates/utils/src/settings/mod.rs#L52 30 + database.uri = "postgres:///lemmy?host=/run/postgresql&user=lemmy"; 29 31 }; 30 32 caddy.enable = true; 31 33 };
+70 -57
pkgs/servers/web-apps/lemmy/package.json
··· 1 1 { 2 2 "name": "lemmy-ui", 3 + "version": "0.18.0", 3 4 "description": "An isomorphic UI for lemmy", 4 - "version": "0.17.4", 5 - "author": "Dessalines <tyhou13@gmx.com>", 5 + "repository": "https://github.com/LemmyNet/lemmy-ui", 6 6 "license": "AGPL-3.0", 7 + "author": "Dessalines <tyhou13@gmx.com>", 7 8 "scripts": { 9 + "prebuild:dev": "yarn clean && node generate_translations.js", 8 10 "build:dev": "webpack --mode=development", 11 + "prebuild:prod": "yarn clean && node generate_translations.js", 9 12 "build:prod": "webpack --mode=production", 10 13 "clean": "yarn run rimraf dist", 11 14 "dev": "yarn start", 12 - "lint": "node generate_translations.js && tsc --noEmit && eslint --report-unused-disable-directives --ext .js,.ts,.tsx src && prettier --check 'src/**/*.tsx'", 13 - "prebuild:dev": "yarn clean && node generate_translations.js", 14 - "prebuild:prod": "yarn clean && node generate_translations.js", 15 + "lint": "yarn translations:generate && tsc --noEmit && eslint --report-unused-disable-directives --ext .js,.ts,.tsx \"src/**\" && prettier --check \"src/**/*.{ts,tsx,js,css,scss}\"", 15 16 "prepare": "husky install", 16 - "start": "yarn build:dev --watch" 17 + "start": "yarn build:dev --watch", 18 + "themes:build": "sass src/assets/css/themes/:src/assets/css/themes", 19 + "themes:watch": "sass --watch src/assets/css/themes/:src/assets/css/themes", 20 + "translations:generate": "node generate_translations.js", 21 + "translations:init": "git submodule init && yarn translations:update", 22 + "translations:update": "git submodule update --remote --recursive" 17 23 }, 18 - "repository": "https://github.com/LemmyNet/lemmy-ui", 24 + "lint-staged": { 25 + "*.{ts,tsx,js}": [ 26 + "prettier --write", 27 + "eslint --fix" 28 + ], 29 + "*.{css, scss}": [ 30 + "prettier --write" 31 + ], 32 + "package.json": [ 33 + "sortpack" 34 + ] 35 + }, 19 36 "dependencies": { 20 37 "@babel/plugin-proposal-decorators": "^7.21.0", 21 - "@babel/plugin-transform-runtime": "^7.21.0", 22 - "@babel/plugin-transform-typescript": "^7.21.0", 23 - "@babel/preset-env": "7.20.2", 24 - "@babel/preset-typescript": "^7.21.0", 25 - "@babel/runtime": "^7.21.0", 38 + "@babel/plugin-transform-runtime": "^7.21.4", 39 + "@babel/plugin-transform-typescript": "^7.21.3", 40 + "@babel/preset-env": "7.21.5", 41 + "@babel/preset-typescript": "^7.21.5", 42 + "@babel/runtime": "^7.21.5", 43 + "@emoji-mart/data": "^1.1.0", 26 44 "autosize": "^6.0.1", 27 45 "babel-loader": "^9.1.2", 28 46 "babel-plugin-inferno": "^6.6.0", 47 + "bootstrap": "^5.2.3", 29 48 "check-password-strength": "^2.0.7", 30 - "choices.js": "^10.2.0", 31 49 "classnames": "^2.3.1", 32 50 "clean-webpack-plugin": "^4.0.0", 33 51 "copy-webpack-plugin": "^11.0.0", 52 + "cross-fetch": "^3.1.5", 34 53 "css-loader": "^6.7.3", 54 + "emoji-mart": "^5.4.0", 35 55 "emoji-short-name": "^2.0.0", 36 56 "express": "~4.18.2", 37 - "html-to-text": "^9.0.4", 38 - "i18next": "^22.4.10", 39 - "inferno": "^8.0.6", 40 - "inferno-create-element": "^8.0.6", 57 + "history": "^5.3.0", 58 + "html-to-text": "^9.0.5", 59 + "i18next": "^22.4.15", 60 + "inferno": "^8.1.1", 61 + "inferno-create-element": "^8.1.1", 41 62 "inferno-helmet": "^5.2.1", 42 - "inferno-hydrate": "^8.0.6", 63 + "inferno-hydrate": "^8.1.1", 43 64 "inferno-i18next-dess": "0.0.2", 44 - "inferno-router": "^8.0.6", 45 - "inferno-server": "^8.0.6", 65 + "inferno-router": "^8.1.1", 66 + "inferno-server": "^8.1.1", 46 67 "isomorphic-cookie": "^1.2.4", 47 68 "jwt-decode": "^3.1.2", 48 - "lemmy-js-client": "0.17.2-rc.1", 69 + "lemmy-js-client": "0.18.0-rc.2", 70 + "lodash": "^4.17.21", 49 71 "markdown-it": "^13.0.1", 50 72 "markdown-it-container": "^3.0.0", 73 + "markdown-it-emoji": "^2.0.2", 51 74 "markdown-it-footnote": "^3.0.3", 52 75 "markdown-it-html5-embed": "^1.0.0", 53 76 "markdown-it-sub": "^1.0.0", 54 77 "markdown-it-sup": "^1.0.0", 55 - "mini-css-extract-plugin": "^2.7.2", 78 + "mini-css-extract-plugin": "^2.7.5", 56 79 "moment": "^2.29.4", 57 - "node-fetch": "^2.6.1", 58 80 "register-service-worker": "^1.7.2", 59 81 "run-node-webpack-plugin": "^1.3.0", 60 - "rxjs": "^7.8.0", 61 82 "sanitize-html": "^2.10.0", 62 - "sass": "^1.58.3", 63 - "sass-loader": "^13.2.0", 83 + "sass": "^1.62.1", 84 + "sass-loader": "^13.2.2", 64 85 "serialize-javascript": "^6.0.1", 86 + "service-worker-webpack": "^1.0.0", 87 + "sharp": "^0.32.1", 65 88 "tippy.js": "^6.3.7", 66 89 "toastify-js": "^1.12.0", 67 90 "tributejs": "^5.1.3", 68 - "webpack": "5.75.0", 69 - "webpack-cli": "^5.0.1", 70 - "webpack-node-externals": "^3.0.0", 71 - "websocket-ts": "^1.1.1" 91 + "webpack": "5.82.1", 92 + "webpack-cli": "^5.1.1", 93 + "webpack-node-externals": "^3.0.0" 72 94 }, 73 95 "devDependencies": { 74 - "@babel/core": "^7.21.0", 96 + "@babel/core": "^7.21.8", 75 97 "@types/autosize": "^4.0.0", 98 + "@types/bootstrap": "^5.2.6", 76 99 "@types/express": "^4.17.17", 77 100 "@types/html-to-text": "^9.0.0", 78 101 "@types/markdown-it": "^12.2.3", 79 102 "@types/markdown-it-container": "^2.0.5", 80 - "@types/node": "^18.14.0", 81 - "@types/node-fetch": "^2.6.2", 82 - "@types/sanitize-html": "^2.8.0", 103 + "@types/node": "^20.1.2", 104 + "@types/sanitize-html": "^2.9.0", 83 105 "@types/serialize-javascript": "^5.0.1", 84 106 "@types/toastify-js": "^1.11.1", 85 - "@typescript-eslint/eslint-plugin": "^5.53.0", 86 - "@typescript-eslint/parser": "^5.53.0", 87 - "bootstrap": "^5.2.3", 88 - "bootswatch": "^5.2.3", 89 - "eslint": "^8.34.0", 90 - "eslint-plugin-inferno": "^7.32.1", 107 + "@typescript-eslint/eslint-plugin": "^5.59.5", 108 + "@typescript-eslint/parser": "^5.59.5", 109 + "eslint": "^8.40.0", 110 + "eslint-plugin-inferno": "^7.32.2", 111 + "eslint-plugin-jsx-a11y": "^6.7.1", 91 112 "eslint-plugin-prettier": "^4.2.1", 92 113 "husky": "^8.0.3", 93 114 "import-sort-style-module": "^6.0.0", 94 - "lint-staged": "^13.1.2", 95 - "prettier": "^2.8.4", 115 + "lint-staged": "^13.2.2", 116 + "prettier": "^2.8.8", 96 117 "prettier-plugin-import-sort": "^0.0.7", 97 118 "prettier-plugin-organize-imports": "^3.2.2", 98 119 "prettier-plugin-packagejson": "^2.4.3", 99 - "rimraf": "^4.1.2", 100 - "sortpack": "^2.3.3", 101 - "style-loader": "^3.3.1", 102 - "terser": "^5.16.4", 103 - "typescript": "^4.9.5", 104 - "webpack-dev-server": "4.11.1" 120 + "rimraf": "^5.0.0", 121 + "sortpack": "^2.3.4", 122 + "style-loader": "^3.3.2", 123 + "terser": "^5.17.3", 124 + "typescript": "^5.0.4", 125 + "webpack-dev-server": "4.15.0" 105 126 }, 127 + "packageManager": "yarn@1.22.19", 106 128 "engines": { 107 129 "node": ">=8.9.0" 108 130 }, 109 131 "engineStrict": true, 110 - "lint-staged": { 111 - "*.{ts,tsx,js}": [ 112 - "prettier --write", 113 - "eslint --fix" 114 - ], 115 - "package.json": [ 116 - "sortpack" 117 - ] 118 - }, 119 132 "importSort": { 120 133 ".js, .jsx, .ts, .tsx": { 121 134 "style": "module",
+5 -5
pkgs/servers/web-apps/lemmy/pin.json
··· 1 1 { 2 - "version": "0.17.4", 3 - "serverSha256": "sha256-nztT6o5Tur64dMWII+wf5CBVJBJ59MGXKdS5OJO0SSc=", 4 - "serverCargoSha256": "sha256-3In2W+cSVtMkaKrn1hWOVL/V/qkKlH30qGPi3rNdpQI=", 5 - "uiSha256": "sha256-Ebc4VzuCJhPoO16qCgSVyYFXH7YcymxcGcN/Sgyg5Gs=", 6 - "uiYarnDepsSha256": "sha256-aZAclSaFZJvuK+FpCBWboGaVEOEJTxq2jnWk0A6iAFw=" 2 + "version": "0.18.0", 3 + "serverSha256": "sha256-KzEelj2/+wfp570Vw1+FoqiYZd1PxELTdopGSeel97E=", 4 + "serverCargoSha256": "sha256-p1ZytuaXouKFkKjsEsaNjndoioTSVVM2pf72qE8/qyM=", 5 + "uiSha256": "sha256-pB6uEL9gDwvsi+FbooKBhTCJ+Qmc6Vl2bBTMiL1hUJI=", 6 + "uiYarnDepsSha256": "sha256-NtluS6Cr39L9nGwNA17c7xsM5xoJraS02a7sp7r9KPI=" 7 7 }
+9
pkgs/servers/web-apps/lemmy/server.nix
··· 26 26 fetchSubmodules = true; 27 27 }; 28 28 29 + patches = [ 30 + # `cargo test` fails as `tokio::test` relies on the macros feature which wasn't specified in Cargo.toml 31 + ./tokio-macros.patch 32 + ]; 33 + 34 + preConfigure = '' 35 + echo 'pub const VERSION: &str = "${version}";' > crates/utils/src/version.rs 36 + ''; 37 + 29 38 cargoSha256 = pinData.serverCargoSha256; 30 39 31 40 buildInputs = [ postgresql ]
+37
pkgs/servers/web-apps/lemmy/tokio-macros.patch
··· 1 + From f8c83b48774d152f9bc590db83c032235ef502a9 Mon Sep 17 00:00:00 2001 2 + From: Jan Klass <kissaki@posteo.de> 3 + Date: Sat, 24 Jun 2023 17:57:59 +0200 4 + Subject: [PATCH] test: Fix missing tokio test macro dependency 5 + 6 + The tests make use of the `#[tokio::test]` macro, but the tokio dependency default feature does not include them. Running cargo test fails. 7 + 8 + By including the `macros` feature on the tokio dependency, cargo test will work. 9 + 10 + --- 11 + 12 + cargo test fails with 13 + 14 + ``` 15 + error[E0433]: failed to resolve: could not find `test` in `tokio` 16 + --> src\scheduled_tasks.rs:295:12 17 + | 18 + 295 | #[tokio::test] 19 + | ^^^^ could not find `test` in `tokio` 20 + ``` 21 + --- 22 + Cargo.toml | 2 +- 23 + 1 file changed, 1 insertion(+), 1 deletion(-) 24 + 25 + diff --git a/Cargo.toml b/Cargo.toml 26 + index 430deb082c..d4c5ab8ef0 100644 27 + --- a/Cargo.toml 28 + +++ b/Cargo.toml 29 + @@ -89,7 +89,7 @@ anyhow = "1.0.71" 30 + diesel_ltree = "0.3.0" 31 + typed-builder = "0.10.0" 32 + serial_test = "0.9.0" 33 + -tokio = "1.28.2" 34 + +tokio = { version = "1.28.2", features = ["macros"] } 35 + sha2 = "0.10.6" 36 + regex = "1.8.4" 37 + once_cell = "1.18.0"
+10
pkgs/servers/web-apps/lemmy/ui.nix
··· 7 7 , fetchFromGitHub 8 8 , fetchYarnDeps 9 9 , nixosTests 10 + , vips 11 + , nodePackages 10 12 }: 11 13 12 14 let ··· 19 21 postInstall = '' 20 22 LIBSASS_EXT=auto yarn --offline run build 21 23 rm build/config.gypi 24 + ''; 25 + }; 26 + sharp = { 27 + nativeBuildInputs = [ pkg-config nodePackages.semver ]; 28 + buildInputs = [ vips ]; 29 + postInstall = '' 30 + yarn --offline run install 22 31 ''; 23 32 }; 24 33 }; ··· 55 64 export HOME=$PWD/yarn_home 56 65 57 66 ln -sf $PWD/node_modules $PWD/deps/lemmy-ui/ 67 + echo 'export const VERSION = "${version}";' > $PWD/deps/lemmy-ui/src/shared/version.ts 58 68 59 69 yarn --offline build:prod 60 70 '';