Skip to content

Commit 5593895

Browse files
authored
[24] Move to new version of danger-js, allowing a move back to ESM for first-party rules (#25)
1 parent 0ba42cc commit 5593895

10 files changed

Lines changed: 239 additions & 767 deletions

File tree

.github/workflows/checks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
matrix:
2222
action:
2323
[
24-
{ command: "DANGER_DISABLE_TRANSPILATION=true npm exec danger ci", name: "Danger" }, # cannot transpile due to https://github.com/danger/danger-js/issues/1469
24+
{ command: "npm exec danger ci", name: "Danger" },
2525
{ command: "npm run lint", name: "Lint" },
2626
{ command: "npm run test:unit", name: "Unit Tests" }
2727
]

babel.config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,8 @@
1212
"plugins": [
1313
"@babel/plugin-transform-runtime",
1414
"@babel/plugin-syntax-import-attributes"
15+
],
16+
"ignore": [
17+
"peripheral/babel-preset-asos/index.js"
1518
]
1619
}

danger/ensure_changelog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const getPackages = require("./get_packages");
1+
import getPackages from "./get_packages";
22

33
const changeLogLocation = "docs/CHANGELOG.md";
44

danger/ensure_version_update.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const getPackages = require("./get_packages.js");
1+
import getPackages from "./get_packages.js";
22

33
const hasPackageVersionChanged = async ({ packageJson }) =>
44
!!(await danger.git.JSONDiffForFile(packageJson)).version;

danger/get_packages.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { spawn } = require("child_process");
1+
import { spawn } from "child_process";
22

33
const getPackages = () =>
44
new Promise((resolve) => {

dangerfile.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

dangerfile.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import "./danger/ensure_changelog";
2+
import "./danger/ensure_version_update";

docs/CHANGELOG.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ N.B. See changelogs for individual packages, where most change will occur:
1414

1515
This log covers the [monorepo](https://en.wikipedia.org/wiki/Monorepo).
1616

17+
## [0.10.6] - 2025-07-14
18+
19+
### Fixed
20+
21+
- Reverted the transpilation hack introduced in [version 0.1.0](#090---2024-11-29) for [danger-js](https://github.com/danger/danger-js), after [implementing a fix](https://github.com/danger/danger-js/pull/1476), thus upgrading danger to `12.3.4`.
22+
- Consistent version linking and full-stops, in this changelog
23+
1724
## [0.10.5] - 2025-03-06
1825

1926
### Fixed
@@ -71,17 +78,17 @@ This log covers the [monorepo](https://en.wikipedia.org/wiki/Monorepo).
7178
### Fixed
7279

7380
- support windows `endOfLine` in lint setup
74-
- ensured that changes to `package-lock.json` caused by a package adding a dependency doesn't necessarily mean a `CHANGELOG.md` or version bump is required in the monorepo root; since it's not really had any meaningful change itself.
81+
- ensured that changes to `package-lock.json` caused by a package adding a dependency doesn't necessarily mean a `CHANGELOG.md` or version bump is required in the monorepo root; since it's not really had any meaningful change itself
7582

7683
## [0.9.0] - 2024-11-29
7784

7885
### Changed
7986

80-
- reluctantly add `react` and `react-dom` to the repo root `package.json`, despite not being needed by all packages, due to errant npm deduping.
87+
- reluctantly add `react` and `react-dom` to the repo root `package.json`, despite not being needed by all packages, due to errant npm deduping
8188
- ingested `peripheral` packages
8289
- reluctantly convert danger files to cjs (& [exclude from transpilation](https://danger.systems/js/tutorials/transpilation#disabling-transpilation)), since peripheral babel modules added create a circular reference in babel, and ignores don't work in danger due to https://github.com/danger/danger-js/issues/1469
8390
- removed the `optimizely` package, since not ready for open source, replaced with a fake activation plugin
84-
- remove `eslint-plugin-markdownlint`, hangover from move to eslint 9 in version `0.6.0`, which has native markdown support
91+
- remove `eslint-plugin-markdownlint`, hangover from move to eslint 9 in [version 0.6.0](#060---2024-11-25), which has native markdown support
8592

8693
## [0.8.0] - 2024-11-29
8794

@@ -112,7 +119,7 @@ This log covers the [monorepo](https://en.wikipedia.org/wiki/Monorepo).
112119

113120
### Fixed
114121

115-
- Removed old `yarn.lock` left over from 0.4.3 update.
122+
- Removed old `yarn.lock` left over from [0.4.3 update](#043---2023-09-12)
116123

117124
## Added
118125

@@ -124,7 +131,7 @@ This log covers the [monorepo](https://en.wikipedia.org/wiki/Monorepo).
124131

125132
- Moved to v4 of [`upload-artifact`](https://github.com/actions/upload-artifact) and [`download-artifact`](https://github.com/actions/download-artifact) actions
126133
- Changed nature of pre-release packages to `beta` from `alpha` (better matching the reality of how these pre-releases are used)
127-
- Fixed up contribution guide since version 0.5.0 added the proposed update checks
134+
- Fixed up contribution guide since [version 0.5.0](#050---2023-10-23) added the proposed update checks
128135
- Updated to JSDoc 4, issue with factories resolved
129136

130137
### Changed
@@ -136,9 +143,9 @@ This log covers the [monorepo](https://en.wikipedia.org/wiki/Monorepo).
136143

137144
### Fixed
138145

139-
- Fixed up the [`pull_request_template.md`](../.github/pull_request_template.md) for ADO & formatting.
146+
- Fixed up the [`pull_request_template.md`](../.github/pull_request_template.md) for ADO & formatting
140147
- Ensured JSDoc linting rules do not apply to test code
141-
- Updated deps to remove 1 high and two moderate npm audit failures.
148+
- Updated deps to remove 1 high and two moderate npm audit failures
142149

143150
## [0.5.7] - 2024-07-19
144151

@@ -166,7 +173,7 @@ This log covers the [monorepo](https://en.wikipedia.org/wiki/Monorepo).
166173

167174
### Fixed
168175

169-
- Fixup documentation left fallow from package split (0.5.0)
176+
- Fixup documentation left fallow from package split [0.5.0](#050---2023-10-23)
170177
- Upgrade serialize-javascript to 6.0.2 to avoid [`SNYK-JS-SERIALIZEJAVASCRIPT-614760`](https://security.snyk.io/vuln/SNYK-JS-SERIALIZEJAVASCRIPT-6147607)
171178
- snyk ignore [`SNYK-JS-INFLIGHT-6095116`](https://security.snyk.io/vuln/SNYK-JS-INFLIGHT-6095116)
172179
- move to use asos runner groups
@@ -195,7 +202,7 @@ This log covers the [monorepo](https://en.wikipedia.org/wiki/Monorepo).
195202

196203
### Changed
197204

198-
- Split the "app" package into separate "ssr", "features" and "react-pointcuts" packages.
205+
- Split the "app" package into separate "ssr", "features" and "react-pointcuts" packages
199206
- Move to explicit rather than wildcard workspaces, to enable reification of the repo when publishing (waiting on [an issue to resolve](https://github.com/Roaders/workspace-version/issues/3))
200207
- Updated the `dedupeExternalJsdocPlugin` to de-duplicate members of external namespaces, rather than just the namespaces themselves (to ensure we don't duplicate React, HostApplication etc. in the html documentation)
201208
- Updated packages for snyk vulnerabilities, populated policy file
@@ -207,7 +214,7 @@ This log covers the [monorepo](https://en.wikipedia.org/wiki/Monorepo).
207214

208215
### Added
209216

210-
- Danger check to ensure that when a package version is updated, any dependent packages also are updated. Needed since "features" relies on "ssr".
217+
- Danger check to ensure that when a package version is updated, any dependent packages also are updated. Needed since "features" relies on "ssr"
211218
- Added `eslint-plugin-workspaces` with recommended rules
212219

213220
## [0.4.5] - 2023-10-03
@@ -230,7 +237,7 @@ This log covers the [monorepo](https://en.wikipedia.org/wiki/Monorepo).
230237

231238
### Changed
232239

233-
- Moved away from SPN usage to app registrations in the GHA pipelines.
240+
- Moved away from SPN usage to app registrations in the GHA pipelines
234241

235242
## [0.4.3] - 2023-09-12
236243

@@ -248,7 +255,7 @@ This log covers the [monorepo](https://en.wikipedia.org/wiki/Monorepo).
248255

249256
### Fixed
250257

251-
- Ensured that failures (due to no changed version) whilst releasing one package do not prevent other jobs in the publish matrix from running, or from marking the workflow as a whole as a failure.
258+
- Ensured that failures (due to no changed version) whilst releasing one package do not prevent other jobs in the publish matrix from running, or from marking the workflow as a whole as a failure
252259

253260
## [0.4.0] - 2022-12-23
254261

@@ -272,4 +279,4 @@ This log covers the [monorepo](https://en.wikipedia.org/wiki/Monorepo).
272279

273280
### Added
274281

275-
- Initial commit.
282+
- Initial commit

0 commit comments

Comments
 (0)