Transpile some newer javascript with babel to run on bullseye's nodejs

This commit is contained in:
Pirate Praveen 2022-10-24 20:15:42 +05:30
parent c94514e0f9
commit f1584cd406
No known key found for this signature in database
GPG key ID: 8F53E0193B294B75
3 changed files with 18 additions and 1 deletions

3
debian/clean vendored
View file

@ -1,3 +1,6 @@
# Created for babeljs/older nodejs compat
node_modules/
## Debian CI:
debian/.gitlab-ci.yml

6
debian/control vendored
View file

@ -58,7 +58,11 @@ Build-Depends: debhelper-compat (= 13),
golang-toml-dev,
golang-websocket-dev,
golang-google-grpc-dev (>= 1.38~),
libimage-exiftool-perl
libimage-exiftool-perl,
# Need this to transpile some javascript to work on nodejs in bullseye
node-babel-cli,
node-babel7 (<< 7.18~) | node-babel-helper-define-polyfill-provider,
node-babel-plugin-lodash
Standards-Version: 4.6.1
Vcs-Git: https://salsa.debian.org/ruby-team/gitlab.git
Vcs-Browser: https://salsa.debian.org/ruby-team/gitlab

10
debian/rules vendored
View file

@ -22,6 +22,16 @@ override_dh_auto_configure-arch:
override_dh_auto_build-indep:
dh_auto_build -O--package=gitlab -O--buildsystem=ruby -O--with=ruby
# Need this since nodejs on bullseye is not supporting some newer syntax
# Failed to load '/usr/share/gitlab/config/webpack.config.js' config
# [webpack-cli] /etc/gitlab/plugins/graphql_known_operations_plugin.js:38
# .map((x) => x.name?.value)
# ^
mkdir -p node_modules
ln -s /usr/share/nodejs/core-js node_modules/
ln -s /usr/share/nodejs/@babel node_modules/
babeljs config/plugins/graphql_known_operations_plugin.js -o config/plugins/graphql_known_operations_plugin.js
rm -rf node_modules
override_dh_auto_build-arch:
dh_auto_build -O--package=gitlab-workhorse -O--buildsystem=golang \