Update lemmy webapp (#147204)

* lemmy: change update script to be more idiomatic

Co-authored-by: Raphael Megzari <raphael@megzari.com>

* lemmy: 0.13.3 -> 0.14.0

Co-authored-by: Raphael Megzari <raphael@megzari.com>

Co-authored-by: Raphael Megzari <raphael@megzari.com>
This commit is contained in:
Bill Ewanick 2021-11-23 20:48:53 -05:00 committed by GitHub
parent 253aba70f6
commit 7a4744b164
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 61 additions and 59 deletions

View file

@ -1,7 +1,7 @@
{
"name": "lemmy-ui",
"description": "An isomorphic UI for lemmy",
"version": "0.13.3",
"version": "0.14.0",
"author": "Dessalines <tyhou13@gmx.com>",
"license": "AGPL-3.0",
"scripts": {
@ -12,24 +12,25 @@
"lint": "node generate_translations.js && tsc --noEmit && eslint --report-unused-disable-directives --ext .js,.ts,.tsx src",
"prebuild:dev": "yarn clean && node generate_translations.js",
"prebuild:prod": "yarn clean && node generate_translations.js",
"prepare": "husky install",
"start": "yarn build:dev --watch"
},
"repository": "https://github.com/LemmyNet/lemmy-ui",
"dependencies": {
"@typescript-eslint/parser": "^4.32.0",
"@typescript-eslint/parser": "^5.4.0",
"autosize": "^5.0.1",
"check-password-strength": "^2.0.3",
"choices.js": "^9.0.1",
"emoji-short-name": "^1.0.0",
"express": "~4.17.1",
"i18next": "^21.1.1",
"inferno": "^7.4.10",
"inferno-create-element": "^7.4.10",
"i18next": "^21.5.0",
"inferno": "^7.4.11",
"inferno-create-element": "^7.4.11",
"inferno-helmet": "^5.2.1",
"inferno-hydrate": "^7.4.10",
"inferno-hydrate": "^7.4.11",
"inferno-i18next-dess": "^0.0.1",
"inferno-router": "^7.4.10",
"inferno-server": "^7.4.10",
"inferno-router": "^7.4.11",
"inferno-server": "^7.4.11",
"isomorphic-cookie": "^1.2.4",
"jwt-decode": "^3.1.2",
"markdown-it": "^12.1.0",
@ -40,57 +41,57 @@
"moment": "^2.29.1",
"reconnecting-websocket": "^4.4.0",
"register-service-worker": "^1.7.2",
"rxjs": "^7.2.0",
"rxjs": "^7.4.0",
"serialize-javascript": "^6.0.0",
"tippy.js": "^6.3.1",
"toastify-js": "^1.11.1",
"tippy.js": "^6.3.7",
"toastify-js": "^1.11.2",
"tributejs": "^5.1.3",
"ws": "^8.2.2"
"ws": "^8.2.3"
},
"devDependencies": {
"@babel/core": "^7.15.5",
"@babel/plugin-transform-runtime": "^7.14.5",
"@babel/plugin-transform-typescript": "^7.15.4",
"@babel/preset-env": "7.15.6",
"@babel/preset-typescript": "^7.14.5",
"@babel/runtime": "^7.15.4",
"@babel/core": "^7.16.0",
"@babel/plugin-transform-runtime": "^7.16.0",
"@babel/plugin-transform-typescript": "^7.16.1",
"@babel/preset-env": "7.16.0",
"@babel/preset-typescript": "^7.16.0",
"@babel/runtime": "^7.16.3",
"@types/autosize": "^4.0.0",
"@types/express": "^4.17.13",
"@types/node": "^16.10.1",
"@types/node": "^16.11.7",
"@types/node-fetch": "^2.5.11",
"@types/serialize-javascript": "^5.0.1",
"@typescript-eslint/eslint-plugin": "^4.32.0",
"babel-loader": "^8.2.2",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"babel-loader": "^8.2.3",
"babel-plugin-inferno": "^6.3.0",
"bootstrap": "^5.1.1",
"bootswatch": "^5.1.1",
"bootstrap": "^5.1.3",
"bootswatch": "^5.1.3",
"clean-webpack-plugin": "^4.0.0",
"copy-webpack-plugin": "^9.0.1",
"css-loader": "^6.3.0",
"eslint": "^7.30.0",
"copy-webpack-plugin": "^9.1.0",
"css-loader": "^6.5.1",
"eslint": "^8.2.0",
"eslint-plugin-prettier": "^4.0.0",
"husky": "^7.0.2",
"husky": "^7.0.4",
"import-sort-style-module": "^6.0.0",
"iso-639-1": "^2.1.9",
"lemmy-js-client": "0.13.0",
"lint-staged": "^11.0.1",
"mini-css-extract-plugin": "^2.3.0",
"iso-639-1": "^2.1.10",
"lemmy-js-client": "0.14.0-rc.1",
"lint-staged": "^11.2.6",
"mini-css-extract-plugin": "^2.4.4",
"node-fetch": "^2.6.1",
"node-sass": "^6.0.1",
"prettier": "^2.4.1",
"prettier-plugin-import-sort": "^0.0.7",
"prettier-plugin-organize-imports": "^2.3.4",
"prettier-plugin-packagejson": "^2.2.13",
"prettier-plugin-packagejson": "^2.2.15",
"rimraf": "^3.0.2",
"run-node-webpack-plugin": "^1.3.0",
"sass-loader": "^12.1.0",
"sass-loader": "^12.3.0",
"sortpack": "^2.2.0",
"style-loader": "^3.3.0",
"terser": "^5.9.0",
"typescript": "^4.4.3",
"webpack": "5.54.0",
"webpack-cli": "^4.7.2",
"webpack-dev-server": "4.3.0",
"style-loader": "^3.3.1",
"terser": "^5.10.0",
"typescript": "^4.4.4",
"webpack": "5.64.1",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "4.5.0",
"webpack-node-externals": "^3.0.0"
},
"engines": {

View file

@ -1,7 +1,7 @@
{
"version": "0.13.3",
"serverSha256": "sha256-Ht+gcNv8gQAQtEuAJ/QH4nNvo+PZogNB09f4eRlvIYg=",
"serverCargoSha256": "sha256-j/l/muCQefvuuWsi+Iahr1M4V6AUzmxm3pr7cJxw7Ww=",
"uiSha256": "sha256-uHb+V3zadiHlExpmAdRLoV3F/0mrYrko6RTDJcw9YO4=",
"uiYarnDepsSha256": "sha256-53sa6uL1+SvhtUtKdS36rBcJVgVXhnNdITWPyauLrx4="
"version": "0.14.0",
"serverSha256": "sha256-rrLOWoy4GkVtfIPpyR0Zwvnqq39CoZRDaVPNSpeJpkA=",
"serverCargoSha256": "sha256-6HrsMwzcmNw8udsCdvn8zgIWN0N3Vvsn9bFk+5tBOds=",
"uiSha256": "sha256-e+ajyUc2P5eK1dH7qQsC9BmZgT3NCGLbbzbUE3i2rXY=",
"uiYarnDepsSha256": "sha256-g3jCc98ftFyvZGD2bESY1eIsLZyQxZpDxgHdRGu78vs="
}

View file

@ -4,27 +4,27 @@
# TODO set to `verbose` or `extdebug` once implemented in oil
shopt --set xtrace
var directory = $(dirname $0 | xargs realpath)
var owner = "LemmyNet"
var ui_repo = "lemmy-ui"
var server_repo = "lemmy"
var latest_rev = $(curl -q https://api.github.com/repos/${owner}/${server_repo}/releases/latest | \
const directory = $(dirname $0 | xargs realpath)
const owner = "LemmyNet"
const ui_repo = "lemmy-ui"
const server_repo = "lemmy"
const latest_rev = $(curl -q https://api.github.com/repos/${owner}/${server_repo}/releases/latest | \
jq -r '.tag_name')
var latest_version = $(echo $latest_rev)
var current_version = $(jq -r '.version' $directory/pin.json)
const latest_version = $(echo $latest_rev)
const current_version = $(jq -r '.version' $directory/pin.json)
if ($latest_version === $current_version) {
echo "lemmy is already up-to-date"
return 0
} else {
# for some strange reason, hydra fails on reading upstream package.json directly
var source = "https://raw.githubusercontent.com/$owner/$ui_repo/$latest_version"
var package_json = "$(curl -qf $source/package.json)"
const source = "https://raw.githubusercontent.com/$owner/$ui_repo/$latest_version"
const package_json = $(curl -qf $source/package.json)
echo $package_json > $directory/package.json
var server_tarball_meta = $(nix-prefetch-github $owner $server_repo --rev "$latest_rev")
var server_tarball_hash = "sha256-$(echo $server_tarball_meta | jq -r '.sha256')"
var ui_tarball_meta = $(nix-prefetch-github $owner $ui_repo --rev "$latest_rev")
var ui_tarball_hash = "sha256-$(echo $ui_tarball_meta | jq -r '.sha256')"
const server_tarball_meta = $(nix-prefetch-github $owner $server_repo --rev $latest_rev)
const server_tarball_hash = "sha256-$(echo $server_tarball_meta | jq -r '.sha256')"
const ui_tarball_meta = $(nix-prefetch-github $owner $ui_repo --rev $latest_rev)
const ui_tarball_hash = "sha256-$(echo $ui_tarball_meta | jq -r '.sha256')"
jq ".version = \"$latest_version\" | \
.\"serverSha256\" = \"$server_tarball_hash\" | \
@ -32,12 +32,12 @@ if ($latest_version === $current_version) {
.\"serverCargoSha256\" = \"\" | \
.\"uiYarnDepsSha256\" = \"\"" $directory/pin.json | sponge $directory/pin.json
var new_cargo_sha256 = $(nix-build -A lemmy-server 2>&1 | \
const new_cargo_sha256 = $(nix-build -A lemmy-server 2>&1 | \
tail -n 2 | \
head -n 1 | \
sd '\s+got:\s+' '')
var new_offline_cache_sha256 = $(nix-build -A lemmy-ui 2>&1 | \
const new_offline_cache_sha256 = $(nix-build -A lemmy-ui 2>&1 | \
tail -n 2 | \
head -n 1 | \
sd '\s+got:\s+' '')
@ -46,3 +46,4 @@ if ($latest_version === $current_version) {
.\"uiYarnDepsSha256\" = \"$new_offline_cache_sha256\"" \
$directory/pin.json | sponge $directory/pin.json
}