12
0
Fork 0
mirror of https://github.com/cycjimmy/semantic-release-action.git synced 2026-05-14 04:20:33 +00:00

more fixes cjs->esm

This commit is contained in:
Leif Ødegård Uhlen 2026-05-05 11:02:21 +02:00
parent 9efd3dd5aa
commit ca92529945
5 changed files with 17 additions and 5 deletions

View file

@ -17,7 +17,7 @@ const run = async () => {
}
}
require('./src/index')();
import('./src/index.js')();
};
run().catch(console.error);

View file

@ -14,7 +14,7 @@ exports.handleBranchesOption = () => {
core.debug(`branches input: ${branches}`);
core.debug(`branch input: ${branch}`);
const semanticVersion = require('semantic-release/package.json').version;
const semanticVersion = import('semantic-release/package.json').version;
const semanticMajorVersion = Number(semanticVersion.replace(/\..+/g, ''));
core.debug(`semanticMajorVersion: ${semanticMajorVersion}`);

View file

@ -1,7 +1,11 @@
import path from 'path';
import * as core from '@actions/core';
import exec from './_exec';
import inputs from './inputs.json';
import path, {dirname} from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
/**
* Install Specifying Version semantic-release

View file

@ -1,7 +1,11 @@
import path from 'path';
import path, {dirname} from 'path';
import { fileURLToPath } from 'url';
import * as core from '@actions/core';
import exec from './_exec';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
/**
* Pre-install extra dependecies
* @returns {Promise<void>}

View file

@ -1,7 +1,11 @@
import path from 'path';
import path, {dirname} from 'path';
import { fileURLToPath } from 'url';
import * as core from '@actions/core';
import outputs from './outputs.json';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
/**
* setUpJob
* @returns {Promise<void>}