Skip to content

Commit

Permalink
Convert generate changelog script to ES module
Browse files Browse the repository at this point in the history
  • Loading branch information
nflaig committed May 12, 2023
1 parent 2d4bc8f commit d5caae9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint-pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
# </common-build>

- 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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
# </common-build>

- 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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] <fromTag> <toTag>
//
// Example
// ```
// node scripts/generate_changelog.js v0.32.0 v0.33.0
// node scripts/generate_changelog.mjs v0.32.0 v0.33.0
// ```

/**
Expand Down

0 comments on commit d5caae9

Please sign in to comment.