Make dependabot check dependencies for NPM and composer (#9479)

* Make dependabot check dependencies for NPM and composer

* Install JS dev requirements through package.json

This way we can have them automatically checked for newer versions.

* Add JS prod dependencies to packages.json for version tracking

They are added as optional dependencies, so we can skip their
installation with `--omit=optional` (as used in the Makefile), but we
can still have them checked for version updates automatically.

The package "publickey" is missing, because it's not available on
npmjs.com, but it hasn't seen updates in years anyway. We probably
should set up a different automatic check for updates nonetheless.

* Remove npm-related files when preparing packaging
This commit is contained in:
Pablo Zmdl
2024-06-08 09:13:23 +02:00
committed by GitHub
parent 6f604bd0fd
commit 3d4c23e9b0
3 changed files with 33 additions and 8 deletions

View File

@@ -4,3 +4,11 @@ updates:
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"

View File

@@ -61,21 +61,18 @@ roundcubemail-git: buildtools
git clone --branch=$(GITBRANCH) --depth=1 $(GITREMOTE) roundcubemail-git
(cd roundcubemail-git; bin/jsshrink.sh; bin/updatecss.sh; bin/cssshrink.sh)
(cd roundcubemail-git/skins/elastic; \
lessc --clean-css="--s1 --advanced" styles/styles.less > styles/styles.min.css; \
lessc --clean-css="--s1 --advanced" styles/print.less > styles/print.min.css; \
lessc --clean-css="--s1 --advanced" styles/embed.less > styles/embed.min.css)
../../node_modules/.bin/lessc --clean-css="--s1 --advanced" styles/styles.less > styles/styles.min.css; \
../../node_modules/.bin/lessc --clean-css="--s1 --advanced" styles/print.less > styles/print.min.css; \
../../node_modules/.bin/lessc --clean-css="--s1 --advanced" styles/embed.less > styles/embed.min.css)
(cd roundcubemail-git/bin; rm -f transifexpull.sh package2composer.sh)
(cd roundcubemail-git; find . -name '.gitignore' | xargs rm -f)
(cd roundcubemail-git; find . -name '.travis.yml' | xargs rm -f)
(cd roundcubemail-git; rm -rf tests plugins/*/tests .git* .tx* .ci* .editorconfig* index-test.php Dockerfile Makefile)
(cd roundcubemail-git; rm -rf tests plugins/*/tests .git* .tx* .ci* .editorconfig* index-test.php Dockerfile Makefile package.json package-lock.json node_modules)
(cd roundcubemail-git; $(SEDI) 's/1.7-git/$(VERSION)/' index.php public_html/index.php installer/index.php program/include/iniset.php program/lib/Roundcube/bootstrap.php)
(cd roundcubemail-git; $(SEDI) 's/# Unreleased/# Release $(VERSION)'/ CHANGELOG.md)
buildtools: /tmp/composer.phar
npm install uglify-js
npm install lessc
npm install less-plugin-clean-css
npm install csso-cli
npm install --include=dev --omit=optional
/tmp/composer.phar:
curl -sS https://getcomposer.org/installer | php -- --install-dir=/tmp/

20
package.json Normal file
View File

@@ -0,0 +1,20 @@
{
"devDependencies": {
"csso-cli": "^4.0.2",
"eslint": "^8.57.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-unicorn": "^53.0.0",
"less": "^4.2.0",
"less-plugin-clean-css": "^1.5.1",
"uglify-js": "^3.17.4"
},
"optionalDependencies": {
"jquery": "^3.7.1",
"tinymce": "^5.10.9",
"openpgp": "^5.0.0",
"codemirror": "^5.58.3",
"bootstrap": "^4.5.3",
"less": "^4.1.3"
}
}