Skip to content

Commit

Permalink
Merge pull request #29471 from storybookjs/valentin/fix-addon-test-ex…
Browse files Browse the repository at this point in the history
…ports

Addon Test: Adjust file exports to be ESM/CJS compatible
  • Loading branch information
valentinpalkovic authored Oct 29, 2024
2 parents 894e809 + bddd5b0 commit a3f3f90
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 15 deletions.
2 changes: 1 addition & 1 deletion code/addons/test/manager.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import './dist/manager';
require('./dist/manager');
1 change: 1 addition & 0 deletions code/addons/test/manager.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './dist/manager';
1 change: 0 additions & 1 deletion code/addons/test/postinstall.cjs

This file was deleted.

1 change: 1 addition & 0 deletions code/addons/test/postinstall.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./dist/postinstall');
1 change: 1 addition & 0 deletions code/addons/test/postinstall.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './dist/postinstall.mjs';
3 changes: 0 additions & 3 deletions code/addons/test/preset.cjs

This file was deleted.

11 changes: 1 addition & 10 deletions code/addons/test/preset.js
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
const { checkActionsLoaded } = require('./dist/preset');

function previewAnnotations(entry = [], options) {
checkActionsLoaded(options.configDir);
return entry;
}

module.exports = {
previewAnnotations,
};
module.exports = require('./dist/preset');
1 change: 1 addition & 0 deletions code/addons/test/preset.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './dist/preset.mjs';

0 comments on commit a3f3f90

Please sign in to comment.