Commit Graph

9 Commits

Author SHA1 Message Date
Chris Kay dc59d726e7 build(npm): add Standard Version v9.3.2
This tool is used to generate changelogs, tag repositories and bump
version numbers across the code-base. In preparation for the v2.6.0
release of TF-A, we will be incorporating it into our release workflow,
with the hope that it can reduce some of the workload involved going
forward.

After this change our dependency license situation is as follows:

```
$ license-checker --summary
├─ MIT: 249
├─ ISC: 43
├─ Apache-2.0: 6
├─ BSD-2-Clause: 3
├─ (MIT OR CC0-1.0): 3
├─ BSD-3-Clause: 2
├─ 0BSD: 2
├─ (MIT OR Apache-2.0): 1
├─ BSD*: 1
├─ CC-BY-3.0: 1
└─ CC0-1.0: 1
```

Change-Id: Ie41443045ecff22f322d155a4bed8ab5d92208cd
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-11-17 16:04:36 +00:00
Chris Kay 3a43e6dee4 build(npm): add additional package metadata
Introduces the `name` and `version` fields to the NPM package metadata
file, which are used by Standard Version.

Change-Id: I5266465f746bf29805f36cd94b5e5c20417d7fd0
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-11-17 16:04:36 +00:00
Chris Kay 6558d8e452 build(npm): add license field
This change adds the `license` field to our `package.json` file, which
allows some license checking tools to analyze our dependencies for
license incompatibilities.

The current state of our licensed dependencies is as follows:

```
$ license-checker --summary
├─ MIT: 198
├─ ISC: 31
├─ Apache-2.0: 5
├─ (MIT OR CC0-1.0): 3
├─ BSD-3-Clause: 2
├─ BSD-2-Clause: 2
├─ 0BSD: 2
├─ (MIT OR Apache-2.0): 1
├─ CC-BY-3.0: 1
└─ CC0-1.0: 1
```

Change-Id: I7b9dae1c9f732c7f7491b5d6557dd193b894d70c
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-11-17 16:04:36 +00:00
Chris Kay 3ea076e2e0 build(npm): update Husky to v7.0.4
Change-Id: I708ac9af9311c23b107041b3fc7f1773a83b36c4
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-11-17 16:04:35 +00:00
Chris Kay 67b29a0861 build(npm): update commitlint to v14.1.0
Change-Id: Ied1362e9bac4121fd1512e7dbd847b70458f7b98
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-11-17 16:04:35 +00:00
Chris Kay 7fff6c70ed build(hooks): update Commitizen to ^4.2.4
An indirect dependency of Commitizen (`merge`) is currently failing the
NPM.js auditor due to vulnerability CVE-2020-28499. This commit moves
the minimum version of Commitizen to 4.2.4, which has resolved this
vulnerability.

Change-Id: Ia9455bdbe02f7406c1a106f173c4095943a201ed
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-05-12 15:43:56 +01:00
Chris Kay d97bade107 build(hooks): add commitlint hook
This change adds a configuration for commitlint - a tool designed to
enforce a particular commit message style - and run it as part of Git's
commit-msg hook. This validates commits immediately after the editor has
been exited, and the configuration is derived from the configuration we
provide to Commitizen.

While the configuration provided suggests a maximum header and body
length, neither of these are hard errors. This is to accommodate the
occasional commit where it may be difficult or impossible to comply
with the length requirements (for example, with a particularly long
scope, or a long URL in the message body).

Change-Id: Ib5e90472fd1f1da9c2bff47703c9682232ee5679
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-04-19 14:06:25 +01:00
Chris Kay c75ce067aa build(hooks): add Commitizen hook
This change adds Commitizen, an interactive tool for writing commit
messages, to the package.json file. This installs Commitizen within the
`node_modules` directory automatically when developers invoke
`npm install` from the root repository directory.

Additionally, this change adds a prepare-commit-msg Git hook which
invokes Commitizen prior to generation of the default commit message.
It may be exited with the standard ^C signal without terminating the
commit process for those who desperately want to avoid using it, but
otherwise should encourage developers to conform to the new commit style
without running into post-commit linting errors.

Change-Id: I8a1e268ed40b61af38519d13d62b116fce76a494
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-04-19 14:06:25 +01:00
Chris Kay ba39362f21 build(hooks): add Husky configuration
Husky is a tool for managing Git hooks within the repository itself.
Traditionally, commit hooks need to be manually installed on a per-user
basis, but Husky allows us to install these hooks either automatically
when `npm install` is invoked within the repository, or manually with
`npx husky install`.

This will become useful for us in the next few patches when we begin
introducing tools for enforcing a commit message style.

Change-Id: I64cae147e9ea910347416cfe0bcc4652ec9b4830
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-04-19 14:06:25 +01:00