Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cosmic-proto exports through npm #6583

Merged
merged 2 commits into from
Nov 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
12 changes: 6 additions & 6 deletions packages/cosmic-proto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
"exports": {
"./package.json": "./package.json",
"./swingset/msgs.js": {
"types": "./swingset/msgs.d.ts",
"default": "./swingset/msgs.js"
"types": "./dist/agoric/swingset/msgs.d.ts",
"default": "./dist/agoric/swingset/msgs.js"
},
"./swingset/query.js": {
"types": "./swingset/query.d.ts",
"default": "./swingset/query.js"
"types": "./dist/agoric/swingset/query.d.ts",
"default": "./dist/agoric/swingset/query.js"
},
"./swingset/swingset.js": {
"types": "./swingset/swingset.d.ts",
"default": "./swingset/swingset.js"
"types": "./dist/agoric/swingset/swingset.d.ts",
"default": "./dist/agoric/swingset/swingset.js"
}
},
"scripts": {
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';