3
3
*/
4
4
5
5
// For CommonJS use:
6
- // const { readFile } = require('fs').promises;
7
- // const { resolve } = require('path');
6
+ const { readFile } = require ( 'fs' ) . promises ;
7
+ const { resolve } = require ( 'path' ) ;
8
8
9
9
// For ES6 modules use:
10
- import { readFile } from 'fs/promises' ;
11
- import { resolve , dirname } from 'path' ;
12
- import { fileURLToPath } from 'url' ;
10
+ // import { readFile } from 'fs/promises';
11
+ // import { resolve, dirname } from 'path';
12
+ // import { fileURLToPath } from 'url';
13
13
14
14
// Get env vars
15
15
const ref = process . env . GITHUB_REF ;
@@ -106,8 +106,8 @@ async function config() {
106
106
async function loadTemplates ( ) {
107
107
for ( const template of Object . keys ( templates ) ) {
108
108
// For ES6 modules use:
109
- const fileUrl = import . meta. url ;
110
- const __dirname = dirname ( fileURLToPath ( fileUrl ) ) ;
109
+ // const fileUrl = import.meta.url;
110
+ // const __dirname = dirname(fileURLToPath(fileUrl));
111
111
112
112
const filePath = resolve ( __dirname , resourcePath , templates [ template ] . file ) ;
113
113
const text = await readFile ( filePath , 'utf-8' ) ;
@@ -117,12 +117,12 @@ async function loadTemplates() {
117
117
118
118
function getReleaseComment ( ) {
119
119
const url = repositoryUrl + '/releases/tag/${nextRelease.gitTag}' ;
120
- const comment = '🎉 This change has been released in version [${nextRelease.version}](' + url + ')' ;
120
+ let comment = '🎉 This change has been released in version [${nextRelease.version}](' + url + ')' ;
121
121
return comment ;
122
122
}
123
123
124
124
// For CommonJS use:
125
- // module.exports = config();
125
+ module . exports = config ( ) ;
126
126
127
127
// For ES6 modules use:
128
- export default config ( ) ;
128
+ // export default config();
0 commit comments