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

Restrict exports #130

Open
Yolley opened this issue Jan 17, 2024 · 0 comments
Open

Restrict exports #130

Yolley opened this issue Jan 17, 2024 · 0 comments

Comments

@Yolley
Copy link
Collaborator

Yolley commented Jan 17, 2024

Currently we allow importing from dist and also do not re-export sum useful modules from namespaces, so it requires our users to import from dist like so import {IChain} from '@streamflow/stream/dist/common/types.

We should make restricted exports in package.json like so

  "exports": {
    ".": "./dist/index.js",
    "./aptos": "./dist/aptos/index.js",
    "./evm": "./dist/evm/index.js",
    "./solana": "./dist/solana/index.js",
    "./sui": "./dist/sui/index.js"
  },
  "typesVersions": {
    "*": {
      ".": [
        "./dist/index.d.ts"
      ],
      "aptos": [
        "./dist/aptos/index.d.ts"
      ],
      "evm": [
        "./dist/evm/index.d.ts"
      ],
      "solana": [
        "./dist/solana/index.d.ts"
      ],
      "sui": [
        "./dist/sui/index.d.ts"
      ]
    }
  },

It will be a major release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant