chore: move from release to changelog (#292)

This commit is contained in:
Ayo Ayco 2023-03-25 21:10:33 +01:00 committed by GitHub
parent 06d4ce1126
commit 334a4c552b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 106 additions and 92 deletions

View file

@ -0,0 +1,8 @@
---
"create-astro-reactive": patch
"@astro-reactive/validator": patch
"@astro-reactive/form": patch
"@astro-reactive/docs": patch
---
- Update documentation links to release notes

View file

@ -5,7 +5,7 @@
<br />
Server-Side Rendered, Dynamic Components
<br />
Let your data build your UI with native <a href="https://astro.build">Astro</a> components.
Let your data build your UI with <a href="https://astro.build">Astro</a>
<br />
<br />
<a href="https://github.com/astro-reactive/astro-reactive/actions/workflows/build-and-test.yml">
@ -27,8 +27,8 @@
| Package | Release notes | Description |
| ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| [form](https://github.com/astro-reactive/astro-reactive/blob/main/packages/form/README.md) | [![npm](https://img.shields.io/npm/v/@astro-reactive/form)](./packages/form/RELEASE.md) | a dynamic form which can be modified programmatically |
| [validator](https://github.com/astro-reactive/astro-reactive/blob/main/packages/validator/README.md) | [![npm](https://img.shields.io/npm/v/@astro-reactive/validator)](./packages/validator/RELEASE.md) | validators for editable fields |
| [form](https://github.com/astro-reactive/astro-reactive/blob/main/packages/form/README.md) | [![npm](https://img.shields.io/npm/v/@astro-reactive/form)](./packages/form/CHANGELOG.md) | a dynamic form which can be modified programmatically |
| [validator](https://github.com/astro-reactive/astro-reactive/blob/main/packages/validator/README.md) | [![npm](https://img.shields.io/npm/v/@astro-reactive/validator)](./packages/validator/CHANGELOG.md) | validators for editable fields |
| data-grid | 🛠 | a dynamic data grid of values |
| themes | 🛠 | easy-to-use, accessible, consistent cross-browser styles |
| viz | 🛠 | data visualization that emits and responds to events |

View file

@ -7,8 +7,8 @@
- fb11b73: Initial `create-astro-reactive` package
Update packages' meta information (author, homepage)
Upadte LICENSE owner info to `astro-reactive` organization
- 30de516: 1. Change the default of `validateOnLoad` property to true, making server-side rendering validation the default behavior for the `Form` component.
1. Update the demo `index.astro` page by removing the `validateOnLoad` property/directive on the example which should still result to server-side rendered validation results.
- 30de516: Change the default of `validateOnLoad` property to true, making server-side rendering validation the default behavior for the `Form` component.
Update the demo `index.astro` page by removing the `validateOnLoad` property/directive on the example which should still result to server-side rendered validation results.
- Updated dependencies [fb11b73]
- Updated dependencies [30de516]
- @astro-reactive/validator@0.3.3

View file

@ -50,8 +50,8 @@ We will also make this clear in our library documentation as we see them.
| Package | Release notes | Description |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| [form](/en/api/form/form-component) | [![npm](https://img.shields.io/npm/v/@astro-reactive/form)](https://github.com/astro-reactive/astro-reactive/blob/main/packages/form/RELEASE.md) | a dynamic form which can be modified programmatically |
| [validator](https://github.com/astro-reactive/astro-reactive/blob/main/packages/validator/README.md) | [![npm](https://img.shields.io/npm/v/@astro-reactive/validator)](https://github.com/astro-reactive/astro-reactive/blob/main/packages/validator/RELEASE.md) | validators for editable fields |
| [form](/en/api/form/form-component) | [![npm](https://img.shields.io/npm/v/@astro-reactive/form)](https://github.com/astro-reactive/astro-reactive/blob/main/packages/form/CHANGELOG.md) | a dynamic form which can be modified programmatically |
| [validator](https://github.com/astro-reactive/astro-reactive/blob/main/packages/validator/README.md) | [![npm](https://img.shields.io/npm/v/@astro-reactive/validator)](https://github.com/astro-reactive/astro-reactive/blob/main/packages/validator/CHANGELOG.md) | validators for editable fields |
| data-grid | 🛠 | a dynamic data grid of values |
| themes | 🛠 | easy-to-use, accessible, consistent cross-browser styles |
| viz | 🛠 | data visualization that emits and responds to events |

View file

@ -33,5 +33,4 @@ npm create astro-reactive@latest
_All [contributions](https://github.com/astro-reactive/astro-reactive/blob/main/CONTRIBUTING.md) are welcome. Let's make the fastest web forms powered by Astro._
👉 _This package is a work in progress. See the [change log](https://github.com/astro-reactive/astro-reactive/blob/main/packages/create-astro-reactive/RELEASE.md)._
👉 _This package is a work in progress. See the [change log](https://github.com/astro-reactive/astro-reactive/blob/main/packages/create-astro-reactive/CHANGELOG.md)._

View file

@ -4,8 +4,8 @@
### Minor Changes
- 30de516: 1. Change the default of `validateOnLoad` property to true, making server-side rendering validation the default behavior for the `Form` component.
1. Update the demo `index.astro` page by removing the `validateOnLoad` property/directive on the example which should still result to server-side rendered validation results.
- 30de516: Change the default of `validateOnLoad` property to true, making server-side rendering validation the default behavior for the `Form` component.
Update the demo `index.astro` page by removing the `validateOnLoad` property/directive on the example which should still result to server-side rendered validation results.
### Patch Changes

View file

@ -105,5 +105,5 @@ This Form component is designed to work with [Astro Reactive Validator](https://
👉 _All [contributions](https://github.com/astro-reactive/astro-reactive/blob/main/CONTRIBUTING.md) are welcome. Let's make the fastest web forms powered by Astro._
👉 _This package is a work in progress. See the [change log](https://github.com/astro-reactive/astro-reactive/blob/main/packages/form/RELEASE.md)._
👉 _This package is a work in progress. See the [change log](https://github.com/astro-reactive/astro-reactive/blob/main/packages/form/CHANGELOG.md)._

View file

@ -1,107 +1,114 @@
import fs from 'fs';
import { fileURLToPath } from 'url';
import * as path from 'path';
import promptSync from 'prompt-sync';
import fs from "fs";
import { fileURLToPath } from "url";
import * as path from "path";
import promptSync from "prompt-sync";
const prompt = promptSync({sigint: true});
const prompt = promptSync({ sigint: true });
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
function writeReleaseMD(releaseFile, featuresArr, fixesArr) {
var formattedMessage = "";
var formattedMessage = "";
if (featuresArr.length != 0) {
formattedMessage += "Features";
for (var line of featuresArr) {
formattedMessage += "\n\t- " + line;
}
formattedMessage += "\n\n";
if (featuresArr.length != 0) {
formattedMessage += "Features";
for (var line of featuresArr) {
formattedMessage += "\n\t- " + line;
}
formattedMessage += "\n\n";
}
if (fixesArr.length != 0)
{
formattedMessage += "Fixes";
for (var line of fixesArr) {
formattedMessage += "\n\t- " + line;
}
formattedMessage += "\n\n";
if (fixesArr.length != 0) {
formattedMessage += "Fixes";
for (var line of fixesArr) {
formattedMessage += "\n\t- " + line;
}
formattedMessage += "\n\n";
}
//write file
var oldRelease = fs.readFileSync(releaseFile);
var fd = fs.openSync(releaseFile, 'w+');
//write file
var oldRelease = fs.readFileSync(releaseFile);
var fd = fs.openSync(releaseFile, "w+");
fs.writeSync(fd, formattedMessage, 0, formattedMessage.length, 0);
fs.writeSync(fd, oldRelease, 0, oldRelease.length, formattedMessage.length);
fs.close(fd);
fs.writeSync(fd, formattedMessage, 0, formattedMessage.length, 0);
fs.writeSync(fd, oldRelease, 0, oldRelease.length, formattedMessage.length);
fs.close(fd);
}
function main() {
console.log("Astro Reactive PR Release Updater (ctrl-c to exit)");
console.log("Astro Reactive PR Release Updater (ctrl-c to exit)");
var noChanged, feature, fix, breakExisting;
var featuresArr = [];
var fixesArr = [];
var noChanged, feature, fix, breakExisting;
var featuresArr = [];
var fixesArr = [];
do {
console.log(`What package is changed?
do {
console.log(`What package is changed?
1. Common
2. Form
3. Validator`);
noChanged = prompt(": ");
} while (isNaN(noChanged) || parseInt(noChanged) < 1 || parseInt(noChanged) > 3);
noChanged = prompt(": ");
} while (
isNaN(noChanged) ||
parseInt(noChanged) < 1 ||
parseInt(noChanged) > 3
);
do {
console.log("Description of feature (q to finish): ");
feature = prompt(": ");
if (feature != "q") {
console.log("Will this code change break existing examples and/or demo applications? Y/N");
breakExisting = prompt(": ");
if (breakExisting == "Y" || breakExisting == "y") {
feature += " (BREAKING CHANGE)";
}
featuresArr.push(feature);
}
} while (feature != "q");
do {
console.log("Description of feature (q to finish): ");
feature = prompt(": ");
do {
console.log("Description of fix (q to finish): ");
fix = prompt(": ");
if (fix != "q") {
console.log("Will this code change break existing examples and/or demo applications? Y/N");
breakExisting = prompt(": ");
if (breakExisting == "Y" || breakExisting == "y") {
fix += " (BREAKING CHANGE)";
}
fixesArr.push(fix);
}
} while (fix != "q");
switch (noChanged) {
case '1':
var releaseFile = path.resolve(__dirname, './common/RELEASE.md');
writeReleaseMD(releaseFile, featuresArr, fixesArr);
break;
case '2':
var releaseFile = path.resolve(__dirname, './form/RELEASE.md');
writeReleaseMD(releaseFile, featuresArr, fixesArr);
break;
case '3':
var releaseFile = path.resolve(__dirname, './validator/RELEASE.md');
writeReleaseMD(releaseFile, featuresArr, fixesArr);
break;
default:
console.log("Invalid package specified.");
if (feature != "q") {
console.log(
"Will this code change break existing examples and/or demo applications? Y/N"
);
breakExisting = prompt(": ");
if (breakExisting == "Y" || breakExisting == "y") {
feature += " (BREAKING CHANGE)";
}
featuresArr.push(feature);
}
} while (feature != "q");
do {
console.log("Description of fix (q to finish): ");
fix = prompt(": ");
if (fix != "q") {
console.log(
"Will this code change break existing examples and/or demo applications? Y/N"
);
breakExisting = prompt(": ");
if (breakExisting == "Y" || breakExisting == "y") {
fix += " (BREAKING CHANGE)";
}
fixesArr.push(fix);
}
} while (fix != "q");
switch (noChanged) {
case "1":
var releaseFile = path.resolve(__dirname, "./common/CHANGELOG.md");
writeReleaseMD(releaseFile, featuresArr, fixesArr);
break;
case "2":
var releaseFile = path.resolve(__dirname, "./form/CHANGELOG.md");
writeReleaseMD(releaseFile, featuresArr, fixesArr);
break;
case "3":
var releaseFile = path.resolve(__dirname, "./validator/CHANGELOG.md");
writeReleaseMD(releaseFile, featuresArr, fixesArr);
break;
default:
console.log("Invalid package specified.");
}
}
var continueScript;
do {
main();
console.log("Do you want to update another package release? (Y to continue)");
continueScript = prompt(": ");
} while (continueScript == 'Y' || continueScript == 'y');
main();
console.log("Do you want to update another package release? (Y to continue)");
continueScript = prompt(": ");
} while (continueScript == "Y" || continueScript == "y");

View file

@ -103,5 +103,5 @@ This validation library is designed to work with [Astro Reactive Form](https://w
👉 _All [contributions](https://github.com/astro-reactive/astro-reactive/blob/main/CONTRIBUTING.md) are welcome. Let's make the validation library for Astro._
👉 _This package is a work in progress. See the [change log](https://github.com/astro-reactive/astro-reactive/blob/main/packages/validator/RELEASE.md)_.
👉 _This package is a work in progress. See the [change log](https://github.com/astro-reactive/astro-reactive/blob/main/packages/validator/CHANGELOG.md)_.