WIP convert CJS to ESM using https://github.com/homer0/cjs2esm
This commit is contained in:
Vendored
+1
-1
@@ -1 +1 @@
|
||||
module.exports = () => {};
|
||||
export default () => {};
|
||||
|
||||
Vendored
+5
-1
@@ -1,4 +1,4 @@
|
||||
module.exports = {
|
||||
const exported = {
|
||||
verifyConditions: () => {},
|
||||
getLastRelease: () => {},
|
||||
analyzeCommits: () => {},
|
||||
@@ -6,3 +6,7 @@ module.exports = {
|
||||
generateNotes: () => {},
|
||||
publish: () => {},
|
||||
};
|
||||
|
||||
export default exported;
|
||||
|
||||
export const {verifyConditions, getLastRelease, analyzeCommits, verifyRelease, generateNotes, publish} = exported;
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
const SemanticReleaseError = require('@semantic-release/error');
|
||||
import SemanticReleaseError from '@semantic-release/error';
|
||||
|
||||
class InheritedError extends SemanticReleaseError {
|
||||
constructor(message, code) {
|
||||
@@ -9,6 +9,6 @@ class InheritedError extends SemanticReleaseError {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = () => {
|
||||
export default () => {
|
||||
throw new InheritedError('Inherited error', 'EINHERITED');
|
||||
};
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
module.exports = () => {
|
||||
export default () => {
|
||||
const error = new Error('a');
|
||||
error.errorProperty = 'errorProperty';
|
||||
throw error;
|
||||
|
||||
Vendored
+2
-2
@@ -1,5 +1,5 @@
|
||||
const AggregateError = require('aggregate-error');
|
||||
import AggregateError from 'aggregate-error';
|
||||
|
||||
module.exports = () => {
|
||||
export default () => {
|
||||
throw new AggregateError([new Error('a'), new Error('b')]);
|
||||
};
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
module.exports = (pluginConfig, context) => context;
|
||||
export default (pluginConfig, context) => context;
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
module.exports = (pluginConfig, {env, logger}) => {
|
||||
export default (pluginConfig, {env, logger}) => {
|
||||
console.log(`Console: Exposing token ${env.MY_TOKEN}`);
|
||||
logger.log(`Log: Exposing token ${env.MY_TOKEN}`);
|
||||
logger.error(`Error: Console token ${env.MY_TOKEN}`);
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
module.exports = () => {};
|
||||
export default () => {};
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
module.exports = (pluginConfig, context) => ({pluginConfig, context});
|
||||
export default (pluginConfig, context) => ({pluginConfig, context});
|
||||
|
||||
Reference in New Issue
Block a user