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

Change our js/ts/npm build config to get types working in downstream projects #78

Merged
merged 4 commits into from
Jan 29, 2024

Commits on Jan 29, 2024

  1. Adjust the package.json and tsconfig.json that sknpm produces and uses

    The goal: get declaration files working so that we get typing
    information for downstream projects.
    
    Why these settings? Because typescript docs tell me to:
    https://www.typescriptlang.org/docs/handbook/modules/guides/choosing-compiler-options.html
    
    And they work! And I tried a _lot_ of things that didn't until I found
    these docs.
    gregsexton committed Jan 29, 2024
    Configuration menu
    Copy the full SHA
    9c30322 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d0f4a2d View commit details
    Browse the repository at this point in the history
  3. Do not massage declaration import paths

    These are now correctly produced and work. But the path stuff does
    still need to be stripped. It is not supported and requires downstream
    projects to also define the paths. Refer:
    
    https://stackoverflow.com/a/52501384
    microsoft/TypeScript#15479
    gregsexton committed Jan 29, 2024
    Configuration menu
    Copy the full SHA
    998fb71 View commit details
    Browse the repository at this point in the history
  4. Replace all import paths in runtime files .js -> .mjs

    We rename the extension when copying runtime js files over, so we need
    to massage the imports/exports to comply.
    gregsexton committed Jan 29, 2024
    Configuration menu
    Copy the full SHA
    6d11adc View commit details
    Browse the repository at this point in the history