Skip to content

Commit

Permalink
refactor: module re-exports instead of symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Nov 17, 2022
1 parent 884a90f commit ae4772b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/cosmic-proto/MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This package is updated rarely and so the build is checked into SCM. That is, part of `dist` is copied to root so they can be imported in consumers that don't yet support ESM. We also have symlink `./swingset` to the `dist/agoric/swingset` for local requires. (Note [NPM won't publish symlinks](https://github.com/npm/npm/issues/3310)).
This package is updated rarely and so the build is checked into SCM. That is, part of `dist` is copied to root so they can be imported in consumers that don't yet support ESM. We used to have a symlink `./swingset` to the `dist/agoric/swingset` for local requires but [NPM won't publish symlinks](https://github.com/npm/npm/issues/3310)). So now we have modules there that import from `dist/`.

We used to check in `gen` but they're redundant with `dist` output and include `.ts` which creates problems for downstream consumers using TypeScript ([ref](https://github.com/microsoft/TypeScript/issues/47387#issuecomment-1168711813)).

Expand Down
1 change: 0 additions & 1 deletion packages/cosmic-proto/swingset

This file was deleted.

2 changes: 2 additions & 0 deletions packages/cosmic-proto/swingset/msgs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/** @file for backwards compatibility */
export * from '../dist/agoric/swingset/msgs.js';
2 changes: 2 additions & 0 deletions packages/cosmic-proto/swingset/query.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/** @file for backwards compatibility */
export * from '../dist/agoric/swingset/query.js';
2 changes: 2 additions & 0 deletions packages/cosmic-proto/swingset/swingset.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/** @file for backwards compatibility */
export * from '../dist/agoric/swingset/swingset.js';

0 comments on commit ae4772b

Please sign in to comment.