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(build): Use ttsc for compiling #776

Merged
merged 2 commits into from
Nov 6, 2019

Conversation

BinaryMuse
Copy link
Contributor

@BinaryMuse BinaryMuse commented Nov 6, 2019

#701 introduced a change to fix imports like "../../core/src" showing up in .d.ts files. However, if you install the latest version (v3.1.1) of stoplight/prism-cli, you'll see that the relative imports still exist in the built package, as no version has been published after this change.

Additionally, the build step in package.json still reads: tsc --build ./packages/tsconfig.build.json; this PR updates it to use ttsc instead, so that type files are created correctly when building locally. The CircleCI config has also been updated to use this build script instead of the one-off npx command.

@XVincentX
Copy link
Contributor

XVincentX commented Nov 6, 2019

Hey @BinaryMuse

However, if you install the latest version (v3.1.1) of stoplight/prism-cli, you'll see that the relative imports still exist in the built package, as no version has been published after this change.

This is correct! We haven't been able to publish (yet) 3.2.0 as we're doing some final e2e tests. However, we have a tagged beta that you can install in case you want to try it out right now.

Thank for the PR, I missed this step!

P.S: I'd really be interested in knowing what are you doing with Prism, especially with the programmatic API (which probably led you to this small issue). Any way we could chat? @rmosolgo

Copy link
Contributor

@karol-maciaszek karol-maciaszek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR 👍

@XVincentX XVincentX merged commit eafb1ae into stoplightio:master Nov 6, 2019
@rmosolgo
Copy link

rmosolgo commented Nov 6, 2019

Hey, yes, I'm trying to build a dynamic mock server that, given a sha, can fetch the OpenAPI for that sha, then serve mock requests 😅 I know it's a bit off the beaten track for this project, but since you all have done so much great work in this area already, it'd be silly for me to reinvent the wheel without trying this out first.

For the moment, it works fine: it's just a very small OpenAPI spec, so fetching, parsing and mocking in a single request cycle is fine. But we'll see how it grows 😆

This was my first go at TypeScript, so I called for help when I encountered the error mentioned above. Thanks for your work on this! I'll keep an eye out for the new release.

@XVincentX
Copy link
Contributor

Ah nice, understood. So basically what's making you use Prism programmatically is the data source. Neat stuff!

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

Successfully merging this pull request may close these issues.

None yet

4 participants