Upgrade to v1.17.1; auto-generate package.json
As announced in !11 (closed), here is the upgrade to the latest released version.
To ease such upgrades, I have fully automated the generation of the package.json
needed to build theia-electron
. Ideally, you just need to update pkgver
for an upgrade from now on.
Auto-generation of a suitable package.json
is done by the script make-package-json.sh
. Look at the end of it. You will recognize a template of your package.json
with placeholders $theia_version
, $theia_plugins
, and $theia_deps
. Most of the remaining script is about filling in the values for those placeholders. The code is not beautiful but straightforward, and it does a lot of checking to protect its users from bad surprises. It even supports *-next.*
versions for snapshots. (In pkgver
, you are supposed to replace the -
with .
.) Try:
./make-package-json.sh --help # for documentation
./make-package-json.sh # autodetects latest stable release
./make-package-json.sh 1.17.0 # notes that this is not the latest
./make-package-json.sh 1.17.1
./make-package-json.sh 1.17.0-next.9da078cb # notes that 1.17.0 is released
./make-package-json.sh 1.18.0-next.1f1aecb5
make-package-json.sh
also reads extra-plugins.json
where you can list plugins to add, remove, or freeze at a given version. This is where we put our handling of the vscode.markdown-language-features
. You can also use this to add more plugins as suggested in #8.
The changes to PKGBUILD
are simple: Remove package.json
and add make-package-json.sh
and extra-plugins.json
instead. Add makedepends
, most importantly jq
. Add a prepare
function to call make-package-json.sh
to create the package.json
to use.
I have taken the liberty to simplify the package
function a bit. As package.json
is no longer a symlink, we can merge its install command with the previous ones.
For additional robustness I have added a -H
option to cp
which would cause command-line symlinks to be dereferenced.