Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(lts-schedule): Introduce fork of the Node.js LTS schedule script #1792

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .commitlintrc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default {
'design-tokens',
'form-validations',
'icons',
'lts-schedule',
'web',
'web-react',
'web-twig',
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ makefile

# Images
*.png
*.svg

# Ignore File
.*ignore
Expand Down
2 changes: 1 addition & 1 deletion .remarkrc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default {
[
'remark-lint-heading-capitalization',
{
lowerCaseWords: ['eu/spirit', '@lmc', 'spirit/node', 'spirit/jsdom', 'v1', 'v2', 'v3'],
lowerCaseWords: ['eu/spirit', '@lmc', 'spirit/node', 'spirit/jsdom', 'lts-schedule', 'v1', 'v2', 'v3'],
},
],
],
Expand Down
111 changes: 111 additions & 0 deletions docs/contribution/release-schedule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Spirit Design System Release Schedule

This is a living document outlining the plan for previous, current, and future
major versions of the Spirit Design System.

| Release | Status | Initial release | Begin Active | Begin Maintenance | End of Life |
| ------------ | ----------- | --------------- | ------------ | ----------------- | ----------- |
| `main` | unstable | unstable | unstable | unstable | unstable |
| v0 | End of Life | 2021-09-20 | 2021-09-20 | 2023-07-21 | 2024-06-10 |
| v1 🌟 Aura | End of Life | 2023-07-21 | 2023-07-21 | 2024-06-10 | 2024-10-17 |
| v2 🍃 Breeze | Maintenance | 2024-06-10 | 2024-06-10 | 2024-11-25 | -/- |
| v3 ✨ Charm | Active | 2024-10-17 | 2024-11-25 | -/- | -/- |
| v4 🌈 Divine | Unreleased | -/- | -/- | -/- | -/- |

> Dates are subject to change

![schedule][release-schedule-static]

## Next Major Release Plans

👉 See [Releases in Jira Board][release-jira-board] and [Quarterly Goals][quarterly-goals] in the Notion.

## Next Major Release Plans

👉 See [Releases in Jira Board][release-jira-board].

## Release Phases

### Prerelease

The prerelease phase is intended to be the opportunity for early adopters,
library authors, and other strategic ecosystem partners to begin to evaluate and
integrate new changes into their codebases. For v3, this phase was more than a one month
long and spanned five prerelease/alpha releases. We hope to extend this timeframe
even further for our next major version.

### Active

Consuming projects should always aim to follow the Active release.

A release in the Active phase receives biweekly minor releases containing new
features and fixes. The work we deliver into `main` every day is considered
unstable. Almost every two weeks we package up these changes into a new minor version
that is published from `main` as the current Active version.

### Maintenance

For a release in the Maintenance phase, patch releases are published containing
security patches and critical bug fixes. When a version moves from Active to
Maintenance, consuming projects should begin migrating to the new Active major
version. During Maintenance we also consider adding non-critical bug fixes on an
ad hoc basis, by request only. To request a fix be back-ported to a Maintenance
release, please
[open an issue][spirit-jira-board] or let us know in [support Slack channel][spirit-support-slack-channel].

Changes required for critical security and bug fixes may lead to semver-major
changes landing within a release stream, such situations will be rare and will
land as semver-minor. Although, those changes should have a revert option
included.

## Release Cycle Duration

There is no fixed release lifetime yet.
However, based on our experience to date, we estimate the length of the **active phase** to be **between six months and a year**.
We anticipate that this life phase will be extended.

## Release Support Policy

We provide an active support for the current Active release and previous Maintenance release.

To get support for a specific version, please refer to the [support Slack channel][spirit-support-slack-channel].

## Release Names

To get more information about the release names, please refer to the [Release Namse Decision][release-name-decision].

## Assets Managed Under This Release Schedule

This plan covers the design and development assets under maintenance of the
Spirit Design System core team. This includes the `@lmc-eu/spirit-web`, `@lmc-eu/spirit-web-react` and
`@lmc-eu/spirit-design-tokens` packages, as well as all other packages within the
[`spirit` monorepo][spirit-github-monorepo].

This plan also includes all design guidance and design kit assets (figma, etc.)
present in the
[`spirit-docs-website`][spirit-docs] and
[`spirit-ui-kit`][spirit-figma]
repositories.

## Acknowledgements

This document was heavily inspired by the work of the
[NodeJS Release Working Group][node-js-release-working-group] and [Carbon Design System Release Schedule][carbon-release-schedule].

The schedule graph was generated using
[our fork][spirit-lts-schedule] of
[`nodejs/lts-schedule`][node-lts-schedule]

[carbon-release-schedule]: https://github.com/carbon-design-system/carbon/blob/main/docs/release-schedule.md
[node-js-release-working-group]: https://github.com/nodejs/release
[node-lts-schedule]: https://github.com/nodejs/lts-schedule
[release-jira-board]: https://jira.almacareer.tech/projects/DS?selectedItem=com.atlassian.jira.jira-projects-plugin%3Arelease-page&status=released-unreleased
[release-names-decision]: https://github.com/lmc-eu/spirit-design-system/blob/main/docs/decisions/007-release-names.md
[release-schedule-static]: https://raw.githubusercontent.com/lmc-eu/spirit-design-system/refs/heads/main/static/release-schedule.svg
[spirit-docs]: https://spirit.design
[spirit-figma]: https://www.figma.com/design/w9Ca4hvkuYLshsrHu1bYwT/Spirit-UI-KIT?node-id=22776-26259&node-type=canvas&t=JIF1i6Yfp9rGUA35-0
[spirit-github-monorepo]: https://github.com/lmc-eu/spirit-design-system
[spirit-jira-board]: https://jira.almacareer.tech/secure/RapidBoard.jspa?rapidView=366&projectKey=DS
[spirit-lts-schedule]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/lts-schedule
[spirit-support-slack-channel]: https://almamedia.slack.com/archives/C068XPSDWQN
[quarterly-goals]: https://www.notion.so/almacareer/Spirit-Design-System-Quarterly-Goals-878e92d5b74543039e513c0160fb9117
37 changes: 37 additions & 0 deletions packages/lts-schedule/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# lts-schedule

A command line utility that generates the Spirit LTS schedule as a graph.
Accepts JSON LTS data and a date range as inputs.
Writes the LTS graph as HTML, SVG, and PNG files.

## 👨‍💻 Usage

```bash
node bin/lts.js -s 2021-07-01 -e 2027-06-01 -h output.html -g output.svg -p output.png
```

### Options

- `-d`, `--data` - The path of the input JSON file. The JSON file should be of the same format as the [one in Node's LTS repo][node-lts-repo]. If this option is not provided, `lts` uses its own bundled JSON file.
- `-s`, `--start` - The start date of the graph. Internally, this option is passed to `new Date()`. Optional. Defaults to the current date.
- `-e`, `--end` - The end date of the graph. Internally, this option is passed to `new Date()`. Optional. Defaults to one year from the current date.
- `-h`, `--html` - The location to write the HTML output file. Optional.
- `-g`, `--svg` - The location to write the SVG output file. Optional.
- `-p`, `--png` - The location to write the PNG output file. Uses `svg2png` under the hood. Optional.
- `-a`, `--animate` - Animate the bars of the graph on load.
- `-m`, `--excludeMaster` - Exclude the `Master (unstable)` bar that is ever-present at the top of the graph. Optional. Defaults to false
- `-n`, `--projectName` - Provide a project name for the graph which will be displayed on the left axis beside each version. Optional. Defaults to `Node.js`

## 🙌 Contributing

We're always looking for contributors to help us fix bugs, build new features,
or help us improve the project documentation. If you're interested, definitely
check out our [Contributing Guide][contributing]! 👀

## 📝 License

Licensed under the [MIT][license].

[contributing]: https://github.com/lmc-eu/spirit-design-system/blob/main/CONTRIBUTING.md
[node-lts-repo]: https://github.com/nodejs/LTS/blob/master/schedule.json
[license]: https://github.com/lmc-eu/spirit-design-system/blob/main/LICENSE.md
107 changes: 107 additions & 0 deletions packages/lts-schedule/bin/lts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
#!/usr/bin/env node
const Path = require('path');
// eslint-disable-next-line import/no-unresolved
const Bossy = require('bossy');
const Lib = require('../lib');

const now = new Date();
const oneYearFromNow = new Date();

oneYearFromNow.setFullYear(now.getFullYear() + 1);

const cliArgs = {
d: {
description: 'Input LTS JSON file',
alias: 'data',
type: 'string',
require: false,
multiple: false,
default: Path.resolve(__dirname, '..', 'lts.json')
},
s: {
description: 'Query start date',
alias: 'start',
type: 'string',
require: false,
multiple: false,
default: now
},
e: {
description: 'Query end date',
alias: 'end',
type: 'string',
require: false,
multiple: false,
default: oneYearFromNow
},
h: {
description: 'HTML output file',
alias: 'html',
type: 'string',
require: false,
multiple: false,
default: null
},
g: {
description: 'SVG output file',
alias: 'svg',
type: 'string',
require: false,
multiple: false,
default: null
},
p: {
description: 'PNG output file',
alias: 'png',
type: 'string',
require: false,
multiple: false,
default: null
},
a: {
description: 'Animate bars on load',
alias: 'animate',
type: 'boolean',
require: false,
multiple: false,
default: false
},
m: {
description: 'Exclude Master (unstable) in graph',
alias: 'excludeMaster',
type: 'boolean',
require: false,
multiple: false,
default: false
},
n: {
description: 'Project Name',
alias: 'projectName',
type: 'string',
require: false,
multiple: false,
default: 'Spirit'
}
};

const args = Bossy.parse(cliArgs, { argv: process.argv });

if (args instanceof Error) {
Bossy.usage(cliArgs, args.message);
process.exit(1);
}

const options = {
// eslint-disable-next-line import/no-dynamic-require, global-require
data: require(args.data),
queryStart: new Date(args.start),
queryEnd: new Date(args.end),
html: args.html ? Path.resolve(args.html) : null,
svg: args.svg ? Path.resolve(args.svg) : null,
png: args.png ? Path.resolve(args.png) : null,
animate: args.animate,
excludeMaster: args.excludeMaster,
projectName: args.projectName
};

Lib.create(options);
Loading
Loading