Commit graph

372 commits

Author SHA1 Message Date
Martin Pitt
96e9c669ad npm: Lock mini-css-extract-plugin at version 2.4.5
2.5 has an unintended API breakage:

  https://github.com/webpack-contrib/mini-css-extract-plugin/issues/896
2022-01-17 12:19:58 +01:00
Jelle van der Waa
a9b9484166 webpack: Fail on eslint warnings
Ensures we don't merge code with eslint warnings.
2022-01-17 12:19:58 +01:00
Jelle van der Waa
9662fb2ffc Add ability to rsync artifacts to a remote machine
Use the CockpitRsyncWebpack plugin to optionally rsync build code to a
remote machine, the destination is determined by looking at the
package.json's name field.
2022-01-04 15:36:52 +01:00
Martin Pitt
ba3913caa0 fmf: Work around missing /etc/nsswitch.conf in Fedora Rawhide
Upgrading glibc in Rawhide now (semi-intentionally) removes
/etc/nsswitch.conf, but does not enforce installing a new enough
pam/authselect to ensure that it gets re-added. This breaks resolving
"localhost".

Reported as https://bugzilla.redhat.com/show_bug.cgi?id=2033020
2021-12-16 08:40:55 +01:00
Cockpit Project
2e17e9a79b package.json: Update @patternfly/patternfly, @patternfly/react-core
Closes #518
2021-12-15 08:48:43 +01:00
Martin Pitt
9e162423eb fmf: Go back to firefox distro version
By now the packaged firefox contains CDP. This makes the tests more
robust against CDP breakage in nightly.
2021-12-15 09:24:48 +02:00
Garrett LeSage
7be9253229 Fix spelling error found by codespell 2021-12-14 12:15:43 +01:00
Martin Pitt
7e2f3d2b5c webpack: Drop obsolete md4 hash hack
webpack 5.54 solved this properly, bump the dependency.
2021-12-14 10:24:56 +01:00
Martin Pitt
db6397050a webpack: Drop unused import
See https://github.com/cockpit-project/cockpit-podman/issues/855
2021-12-14 09:15:52 +01:00
Martin Pitt
aa8308c380 test: Drop obsolete language switcher cases
The oldest release which we support is 251 from RHEL/CentOS 8.5, so we
don't need the older cases any more. Also move to
MachineCase.system_before().
2021-11-29 11:20:59 +01:00
Martin Pitt
150e59c548 package.json: Update React to 17 2021-11-29 10:58:57 +01:00
Martin Pitt
11ff944f2c package.json: Update various development packages
These work without any source changes.

Don't update copy-webpack-plugin to the latest 10 major release, but
keep it at 9. 10 breaks compatibility with node.js 10, but that is still
the default in CentOS 8 stream (and we can't select the newer modules in
the spec or packit.yml).
2021-11-29 10:58:57 +01:00
Martin Pitt
67c1c065e9 package.json: Drop core-js
starter-kit does not use it directly, and none of our derived projects
have it.
2021-11-29 10:58:57 +01:00
Martin Pitt
4820c2b740 test: Adjust language changing for Cockpit 258
That version rewrote the Shell in React, the ids/classes changed.
2021-11-29 09:40:38 +01:00
Martin Pitt
5966735547 po: Pick up also strings with specified context
Strings like `_("Context", "String to translate")` were not picked up.

Taken from ba95d680d2
2021-11-19 09:56:23 +01:00
Cockpit Project
833326148f package.json: Update @patternfly/patternfly, @patternfly/react-core
Closes #509
2021-11-19 06:58:40 +01:00
Martin Pitt
c04d951964 packit: Run tests on CentOS 9 stream 2021-11-16 15:20:32 +01:00
Cockpit Project
3536eafd5a package.json: Update core-js
Closes #506
2021-11-03 07:32:12 +01:00
Cockpit Project
a302255b3a package.json: Update @patternfly/patternfly, @patternfly/react-core
Closes #505
2021-10-30 17:25:43 +02:00
Cockpit Project
f8024eb1f0 package.json: Update core-js
Closes #504
2021-10-26 07:24:56 +02:00
Cockpit Project
0a02205869 package.json: Update @patternfly/patternfly, @patternfly/react-core
Closes #503
2021-10-15 06:28:56 +02:00
Cockpit Project
4e0dce1ca6 package.json: Update core-js
Closes #502
2021-10-13 06:58:12 +02:00
Martin Pitt
0abeda3528 webpack: Use default resolve path for npm 7 compatibility
npm 7 changed how it resolves dependencies, and starter-kit fails to
build with lots of unresolved peer dependencies of PatternFly.

With an absolute path, `resolve.modules` will only look in that
directory; the default is a relative path "node_modules" that just
works [1]. Use that default, as we don't use `$SRCDIR` in this project
anyway.

[1] https://webpack.js.org/configuration/resolve/#resolvemodules
2021-10-12 08:40:12 +02:00
Martin Pitt
8074af0fbd fmf: Only install git-core
We don't need all the bells and whistles of the full git package.
2021-10-07 12:38:03 +02:00
Martin Pitt
72c15c4b82 packit: Enable CentOS Stream 8 2021-10-07 12:38:03 +02:00
Martin Pitt
5d15bdac5c fmf: Dependency installation robustification
Sync some improvements from cockpit-machines:

 * Unbreak running `tmt` in local trees with an already existing ./bots
   symlink.
 * Don't install all NPM packages, only chrome-remote-interface and sizzle.
 * Disable detection of affected tests, taking too long for real
   projects.
2021-10-07 12:38:03 +02:00
Martin Pitt
0bc01714ee fmf: Run tests with firefox
Chromium has started to crash in current Fedora, and is not easily
available in RHEL.

Install bzip2 to unpack the nightly tarball.
2021-10-07 12:38:03 +02:00
Cockpit Project
11da2d284b package.json: Update core-js
Closes #499
2021-10-06 08:08:32 +02:00
Cockpit Project
6e2d0dd01c package.json: Update core-js
Closes #498
2021-09-27 07:16:56 +02:00
Martin Pitt
7dc9fda241 eslint: Enable no-var rule
`var` has broken/unexpected scoping in JavaScript, and can lead to
subtle errors. It's preferable and safer to use `const` whenever
possible, and `let` where necessary.

There are no usages of `var` in starter-kit right now, so just enable
the rule to ensure that it stays that way.
2021-09-21 10:35:11 +02:00
Martin Pitt
3220617fec webpack: Avoid md4 hash for OpenSSL 3 compatibility
CentOS/RHEL 9 switched to OpenSSL 3, which does not support the `md4`
hash any more. webpack 5 hardcodes that in no less than 21 places, so
monkey-patch `crypto.createHash()` to substitute sha256 for md4.

Hack to work around https://github.com/webpack/webpack/issues/13572
2021-09-21 10:00:26 +02:00
Cockpit Project
a8e052a78d package.json: Update @patternfly/react-core, @patternfly/patternfly
Closes #495
2021-09-21 09:11:48 +02:00
Cockpit Project
aa1b3cb713 package.json: Update core-js
Closes #494
2021-09-20 06:57:55 +02:00
Martin Pitt
a5f319b804 spec: Avoid repeating package name
Use rpm's `%{name}` macro instead. This makes it easier for forks to
keep the spec file in sync.
2021-09-16 10:32:58 +02:00
Martin Pitt
cd0b88682d Bump cockpit lib and test framework to 253
No changes necessary.
2021-09-16 10:32:58 +02:00
Martin Pitt
64b83498aa Makefile: Avoid cockpit-po-plugin.js hardlink in dist tarball
Drop the redundant `$(LIB_TEST)` from the tar file list; it is
src/lib/cockpit-po-plugin.js, which is already contained in src/lib, and
tar turns that into an unsightly hardlink.

See https://github.com/cockpit-project/cockpit-machines/issues/379
2021-09-16 09:12:18 +02:00
Jelle van der Waa
6ff3b7d6bc .gitignore: add tmp directory
Include to tmp/ directory to be ignored, it usually contains temporary
vm-run images.
2021-09-14 07:27:19 +02:00
Martin Pitt
9574611768 Rebuild webpack during RPM build
This is necessary to comply with Fedora's packaging policy:
https://docs.fedoraproject.org/en-US/packaging-guidelines/JavaScript/

Include the node cache in the source rpm, unpack it into the main source
dir, and force a webpack rebuild in `%build`.
2021-09-10 17:50:06 +02:00
Martin Pitt
4ca75f143c Move to xz dist tarballs
For consistency with the already xz'ed node tarball.

Rename the oddly named `dist-gzip` target to the standard `dist`.
2021-09-10 17:50:06 +02:00
Martin Pitt
26be6c8540 Add a make node-cache
The node_modules cache tarball will be published as release artifact, to
make sure that any release can be rebuilt in a reproducible way.

Cockpituous' release-source will call this if available:
https://github.com/cockpit-project/cockpituous/pull/438
2021-09-10 17:50:06 +02:00
Martin Pitt
94194c5187 Makefile: Ship full src/lib/ in release tarballs
Otherwise it is incomplete and can't be rebuilt.
2021-09-10 17:50:06 +02:00
Martin Pitt
e49b2747bc Makefile: Avoid npm dependency for building webpack
Avoid the indirection, and directly call webpack. This avoids adding an
`npm` build dependency if/when the RPM wants to rebuild the webpack
during package build.
2021-09-10 17:50:06 +02:00
Martin Pitt
03d8324c19 Makefile: Avoid moving node_modules/ during dist build
This is ugly as it races with other make targets which expect
node_modules/ to exist. It's also unnecessary, we can just tell tar to
ignore node_modules/.
2021-09-10 17:50:06 +02:00
Cockpit Project
0134d26783 package.json: Update core-js
Closes #489
2021-09-10 06:52:24 +02:00
Martin Pitt
a44ef8bb61 cirrus CI: Move to Fedora 35 2021-09-03 07:42:17 +02:00
Cockpit Project
c1f8802da6 package.json: Update core-js
Closes #486
2021-09-03 07:04:53 +02:00
Cockpit Project
fb4c4346c9 package.json: Update core-js
Closes #485
2021-09-02 07:08:11 +02:00
Cockpit Project
78ea4a529a package.json: Update core-js
Closes #484
2021-08-30 06:08:18 +02:00
Cockpit Project
a84bd78b61 package.json: Update @patternfly/react-core, @patternfly/patternfly
Closes #483
2021-08-27 06:15:46 +02:00
Cockpit Project
92d7e38d49 package.json: Update core-js
Closes #482
2021-08-25 11:05:18 +02:00