From d5caae999fe93e9fd5a7c94ccf5c367b15d1a480 Mon Sep 17 00:00:00 2001 From: Nico Flaig Date: Fri, 12 May 2023 15:58:37 +0200 Subject: [PATCH] Convert generate changelog script to ES module --- .github/workflows/lint-pr-title.yml | 2 +- .github/workflows/publish-rc.yml | 2 +- .github/workflows/publish-stable.yml | 2 +- scripts/{generate_changelog.js => generate_changelog.mjs} | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) rename scripts/{generate_changelog.js => generate_changelog.mjs} (97%) diff --git a/.github/workflows/lint-pr-title.yml b/.github/workflows/lint-pr-title.yml index 5aac4dfb49d1..52fb5197d36a 100644 --- a/.github/workflows/lint-pr-title.yml +++ b/.github/workflows/lint-pr-title.yml @@ -20,7 +20,7 @@ jobs: with: # Configure which types are allowed (newline-delimited). # Default: https://github.com/commitizen/conventional-commit-types - # Customized based on sections defined in scripts/generate_changelog.js + # Customized based on sections defined in scripts/generate_changelog.mjs types: | feat fix diff --git a/.github/workflows/publish-rc.yml b/.github/workflows/publish-rc.yml index 91f3a6c518fd..cbb8096e2f82 100644 --- a/.github/workflows/publish-rc.yml +++ b/.github/workflows/publish-rc.yml @@ -75,7 +75,7 @@ jobs: # - name: Generate changelog - run: node scripts/generate_changelog.js ${{ needs.tag.outputs.prev_tag }} ${{ needs.tag.outputs.tag }} CHANGELOG.md + run: node scripts/generate_changelog.mjs ${{ needs.tag.outputs.prev_tag }} ${{ needs.tag.outputs.tag }} CHANGELOG.md - name: Create Release id: create_release diff --git a/.github/workflows/publish-stable.yml b/.github/workflows/publish-stable.yml index e6f1ab2ed281..930d65332f05 100644 --- a/.github/workflows/publish-stable.yml +++ b/.github/workflows/publish-stable.yml @@ -81,7 +81,7 @@ jobs: # - name: Generate changelog - run: node scripts/generate_changelog.js ${{ needs.tag.outputs.prev_tag }} ${{ needs.tag.outputs.tag }} CHANGELOG.md + run: node scripts/generate_changelog.mjs ${{ needs.tag.outputs.prev_tag }} ${{ needs.tag.outputs.tag }} CHANGELOG.md - name: Create Release id: create_release diff --git a/scripts/generate_changelog.js b/scripts/generate_changelog.mjs similarity index 97% rename from scripts/generate_changelog.js rename to scripts/generate_changelog.mjs index 24277a27aa83..42e2961388b4 100644 --- a/scripts/generate_changelog.js +++ b/scripts/generate_changelog.mjs @@ -6,15 +6,15 @@ no-console */ -const {execSync} = require("node:child_process"); -const fs = require("node:fs"); +import {execSync} from "node:child_process"; +import fs from "node:fs"; // Docs // [script] // // Example // ``` -// node scripts/generate_changelog.js v0.32.0 v0.33.0 +// node scripts/generate_changelog.mjs v0.32.0 v0.33.0 // ``` /**