Commit graph

494 commits

Author SHA1 Message Date
Cockpit Project
178ad4bc9e package.json: Update core-js
Closes #452
2021-04-23 06:10:20 +02:00
Cockpit Project
6356bc70b2 package.json: Update @patternfly/react-core, @patternfly/patternfly
Closes #451
2021-04-22 06:36:08 +02:00
Cockpit Project
1d7aad7c52 package.json: Update core-js
Closes #450
2021-04-20 06:09:02 +02:00
Martin Pitt
180a48caaa Bump cockpit test/common and lib to 242
731fdf82c0 fixed the
deprecation warning in cockpit-po-plugin:

> node:37175) [DEP_WEBPACK_COMPILATION_ASSETS] DeprecationWarning:
> Compilation.assets will be frozen in future, all modifications are
> deprecated.
> BREAKING CHANGE: No more changes should happen to Compilation.assets
> after sealing the Compilation.
2021-04-19 10:33:02 +02:00
Martin Pitt
b5610000b5 fmf: Add glibc-langpack-de test dependency
The tests switch to German, make sure that the corresponding locale
exists. Otherwise, tests will run into unexpected messages like "invalid
or unusable locale: de_DE.UTF-8".
2021-04-19 10:33:02 +02:00
Martin Pitt
d02579694d test: Adjust to language selector change in Cockpit 242
See bf1f645208
2021-04-19 09:46:48 +02:00
Martin Pitt
2624dbb891 Build and ship LICENSE file
Bring back terser-webpack-plugin from commit c52136c051 and re-enable
it. It builds the autogenerated dist/index.js.LICENSE.txt which is quite
important for shipping distribution packages -- c-{podman,machines} both
do this.

Backport 95021c336e
to make sure that the webpack for the release tarball is *actually*
built in production mode.
2021-04-12 08:45:52 +02:00
Martin Pitt
c52136c051 Move to webpack 5
We don't need to explicitly mention TerserJSPlugin any more (from commit
6b8611), as webpack 5 can now extend the `minimizer:` list with the
special `...` syntax.

This gets rid of several `npm install` warnings:

    deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
    deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
    deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
    deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.

as well as 10 MB of node_modules.
2021-04-09 13:01:05 +02:00
Martin Pitt
45b8c2a45a spec: Don't fail if there are no map files 2021-04-09 13:01:05 +02:00
Martin Pitt
0e608d562a Use current babel/eslint integration
Fixes these `npm install` warnings:

> deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
> deprecated eslint-loader@4.0.2: This loader has been deprecated. Please use eslint-webpack-plugin
2021-04-09 09:46:56 +02:00
Martin Pitt
e449e94564 Move babel config into separate file
This works better with the current eslint loader, as then eslint and
babel can look at the same configuration. See
<https://babeljs.io/docs/en/config-files>.

This is similar to .eslintrc.json.
2021-04-09 09:46:56 +02:00
Martin Pitt
04d6c566c7 eslint: Drop some disabled but desirable warnings
Project authors can/should decide about these by themselves.
2021-04-09 09:46:56 +02:00
Martin Pitt
1744ec2f5d Ignore src/lib for eslint
This code comes from cockpit.git. Newer ESLint versions have a lot of
complaints about it, but in starter-kit we can't do anything about these
directly. Let's keep the stricter ESLint settings instead of ignoring a
lot more warnings to cover src/lib.
2021-04-09 09:46:56 +02:00
Cockpit Project
70351d9081 package.json: Update core-js
Closes #444
2021-04-08 06:28:43 +02:00
Cockpit Project
a8eeeefd58 package.json: Update core-js
Closes #443
2021-04-03 09:09:43 +02:00
Cockpit Project
28d6b456cb package.json: Update @patternfly/react-core
Closes #442
2021-04-02 08:12:56 +02:00
Cockpit Project
58cfb84de2 package.json: Update @patternfly/react-core, @patternfly/patternfly
Closes #441
2021-04-01 08:08:30 +02:00
Cockpit Project
957e7f157c package.json: Update @patternfly/react-core, @patternfly/patternfly
Closes #434
2021-03-10 05:48:05 +01:00
Martin Pitt
a26f4048c2 packit: Enable RPM builds and Fedora testing
Teach `make dist-gzip` to print the tarball name as last line, and use
it as `create-archive` action.

Add a `make print-version` command which packit can use. The builtin
default only works if there is at least one git tag, which is not the
case for starter-kit (which is never released).
2021-03-04 11:25:53 +01:00
Martin Pitt
09823650e2 Add FMF test metadata and scripts
Copy and adjust the browser.sh and run-test.sh scripts from
cockpit-podman, which we have used in Fedora/RHEL dist-git gating and
packit tests for a while.
2021-03-04 11:25:53 +01:00
Martin Pitt
603308d424 test: Make tests nondestructive
So that they can run in Packit and Fedora dist-git gating.
2021-03-04 11:25:53 +01:00
Martin Pitt
f02f0fd08f Move default TEST_OS to centos-8-stream
We don't run centos-7 in CI any more, and thus can't guarantee that it
works.
2021-03-04 07:43:16 +01:00
Martin Pitt
d4c81c9152 Bump cockpit test API to 239
Replace the deprecated wait_present().
2021-03-04 07:42:37 +01:00
Cockpit Project
6b40f35e04 package.json: Update core-js
Closes #430
2021-03-01 06:02:45 +01:00
Martin Pitt
b000d6b374 Bump cockpit component library to 238 2021-02-25 08:34:15 +01:00
Martin Pitt
4171293c48 Drop unused version numbers from package.json and manifest
This field was introduced in
https://github.com/cockpit-project/cockpit/pull/4964 as "purely
informational for now", and isn't even parsed by cockpit.

package.json's version would only be relevant for publishing NPM
modules, but cockpit pages are not that.

Neither starter-kit itself nor our derived projects like cockpit-podman
or cockpit-composer have ever maintained these two fields, so just get
rid of them.

This makes the git tag the single source of truth for the version
number.

Fixes #200
2021-02-25 07:50:55 +01:00
Katerina Koukiou
66c6e96406
livetest: fix cloning of repo
Previously it was checking out origin/master not the PR's branch.
2021-02-24 10:48:36 +01:00
Cockpit Project
350621b443 package.json: Update core-js
Closes #424
2021-02-19 05:46:23 +01:00
Cockpit Project
de806efe16 package.json: Update @patternfly/react-core, @patternfly/patternfly
Closes #423
2021-02-18 06:37:34 +01:00
Cockpit Project
6abb6b1944 package.json: Update @patternfly/patternfly, @patternfly/react-core
Closes #422
2021-02-17 06:51:12 +01:00
Katerina Koukiou
6f04071d88
Introduce a github action which builds a cockpit preview when requested
It currently reacts to /livetest comments on PRs and builds cockpit from
the PR's checkout. Then serves it on logs.cockpit-project.org on a port
specified on a follow-up comment to the /livetest.

Cockpit developers can now utilize this workflow to review a PR without
having to pull and compile the code locally.
2021-02-09 13:58:15 +01:00
Martin Pitt
71a321cc28 Enable webpack watch progress
Without that, `npm run watch` is entirely silent after the first build,
and does not give any feedback when a build starts, and even more
importantly, when it's done.
2021-02-01 11:39:58 +01:00
Cockpit Project
dfeb49484c package.json: Update @patternfly package dependencies
Closes #418
2021-01-28 06:03:03 +01:00
Martin Pitt
e031456805 tests: Use cockpit/tasks container in Cirrus CI
This avoids the lengthy (and potentially brittle) installation of
dependencies and having to create an unprivileged user.

Since [1] the tasks container can now fix /dev/kvm permissions.

[1] https://github.com/cockpit-project/cockpituous/pull/366
2021-01-26 14:28:41 +01:00
Martin Pitt
4c3d90d3b3
Run tests on Cirrus CI, drop Travis (#416)
Travis stopped handing out free credits since their plan changes last
November, so tests have not run since then.

Cirrus CI offers an API similar to Travis, and also explicitly supports
/dev/kvm access.

Eventually we want to use the cockpit/tasks container directly. But we
can't fix the /dev/kvm permissions inside that as `sudo` does not work
in that. Once we fix that, the setup will become much cheaper and
simpler.
2021-01-26 05:25:40 +01:00
Martin Pitt
bb06422996
Use Cockpit webpack helpers from cockpit.git
Drop the cockpit-po-plugin.js and sassc-loader.js code copies, and check
them out from a stable cockpit tag, similarly to how we already get the
PatternFly CSS.
2021-01-22 16:04:35 +01:00
Cockpit Project
786fd20df5 package.json: Update core-js package dependency
Closes #415
2021-01-20 05:32:46 +01:00
Martin Pitt
e418cba057 cockpit-po-plugin: Fix crash with plural forms
Declare the `pos` variable. Fixes regression introduced in commit
7f6ef51c12.

Add plural forms to German translations to exercise this code path.
2021-01-07 08:53:23 +01:00
Martin Pitt
7f6ef51c12
Build translations with webpack
Convert the `po2json` script into a webpack plugin, and integrate the
(now trivial) po.empty.js template.

This is the last step for building the entire dist/ directory with
`npm run build` (i.e. a tool that web developers are familiar with),
and not having a split webpack+make toolchain any more.
2021-01-05 14:52:59 +01:00
Martin Pitt
07017f79d8 Eliminate POTFILES.*.in files
The `find` is so cheap that there is little point in the POTFILES.*.in
indirection.
2021-01-04 14:01:59 +01:00
Martin Pitt
88fe99361b Simplify translation template
`this.po` is not being used anywhere, so drop the whole `!loaded` code
path. There is no defer mechanism, so `po.js` *must* be loaded after
cockpit.js. Let's trigger a crash instead of silently dropping
translations, to make such a bug obvious in manual and automatic tests.
2021-01-04 14:01:59 +01:00
Martin Pitt
bb15952fc4 Simplify po.js inclusion
There is no need to jump between directories and even invoke a glob --
the po.<LANG>.js files are right next to index.js.
2021-01-04 14:01:59 +01:00
Martin Pitt
c7f610f489 Fix po2json usage help
The output file is an option, not a positional argument.

`opts.args` is undefined if there are no positional arguments, so that
just calling `po/po2json` crashed with

    TypeError: Cannot read property 'length' of undefined
2021-01-04 14:01:59 +01:00
Martin Pitt
f93ccb26a8 Fix po2json default option arguments
Similarly to commit cbedf06704, provide default values, so that
`po2json po/de.po` does not error out with

    Option "--module" requires 1 arguments, but 0 were provided
2021-01-04 14:01:59 +01:00
Martin Pitt
43c51b979b po: Add Language: header value to German translations 2021-01-04 14:01:59 +01:00
Cockpit Project
de1efaccd3 package.json: Update core-js package dependency
Closes #412
2021-01-04 06:34:07 +01:00
Martin Pitt
670f528781 Adjust test for changed display language modal
f1542d54db rewrote
the language selector dialog. Update the tests to also work with
cockpit ≥ 233.

Do the version comparison dynamically for the time being, as this breaks
several image refreshes. We can drop this again and only use the new
code once all of these landed.
2021-01-01 08:37:23 +01:00
Martin Pitt
3dbd37a8c3
workflows: Move npm-update to Ubuntu 20.04
GitHub's 18.04 additional repositories break NPM. As "ubuntu-latest" is
going to switch to 20.04 soon anyway [1], do the jump now.

[1] https://github.com/actions/virtual-environments/issues/1816

Closes #409
2020-12-28 16:17:11 +01:00
Martin Pitt
539f293b7e webpack: Fix PatternFly font path
Copy the rule that cockpit and cockpit-podman use. Also change the
quoting, to avoid pointless diff noise. Now they are perfectly in sync.
2020-12-17 17:40:47 +01:00
Martin Pitt
dff4b66671 webpack: Only show errors and warnings
Otherwise there is just too much noise and when something is broken, the
error is above 3 pages of pointless logs.

See https://webpack.js.org/configuration/stats/

Cherry-picked from cockpit-podman commit 5989b20a05a.
2020-12-17 17:40:47 +01:00