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

Version 1.0.0 #1

Merged
merged 53 commits into from
May 21, 2019
Merged

Version 1.0.0 #1

merged 53 commits into from
May 21, 2019

Conversation

usergenic
Copy link
Collaborator

No description provided.

.travis.yml Show resolved Hide resolved
Copy link
Contributor

@justinfagnani justinfagnani left a comment

Choose a reason for hiding this comment

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

Let's enable linting and formatting from the get go

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
src/koa-esm-specifier-transform.ts Outdated Show resolved Hide resolved
tsconfig.json Outdated Show resolved Hide resolved
tsconfig.json Outdated Show resolved Hide resolved
tsconfig.json Outdated Show resolved Hide resolved
tsconfig.json Outdated Show resolved Hide resolved
tsconfig.json Outdated Show resolved Hide resolved
Copy link
Member

@aomarks aomarks left a comment

Choose a reason for hiding this comment

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

This is great! I'm very excited for this middleware. I think bare module specifiers are the number 1 initial stumbling block for our users, so having this as such an easy drop-in solution is going to help a lot.

Some first pass comments, I'll do another pass at the code more closely after.

.travis.yml Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
tsconfig.json Show resolved Hide resolved
tsconfig.json Outdated Show resolved Hide resolved
src/koa-npm-resolution.ts Outdated Show resolved Hide resolved
@googlebot

This comment has been minimized.

1 similar comment
@googlebot

This comment has been minimized.

src/koa-node-resolve.ts Outdated Show resolved Hide resolved
@justinfagnani
Copy link
Contributor

Trying this out with some real-world modules, and we're definitely going to need the logic from our existing resolver that uses the package.json module field when present: https://github.com/Polymer/tools/blob/master/packages/analyzer/src/javascript/resolve-specifier-node.ts#L62

…and main support as well as .json and .node extension support for resolution.
src/koa-esm-specifier-transform.ts Outdated Show resolved Hide resolved
src/koa-esm-specifier-transform.ts Outdated Show resolved Hide resolved
src/koa-esm-specifier-transform.ts Outdated Show resolved Hide resolved
src/koa-node-resolve.ts Outdated Show resolved Hide resolved
src/support/resolve-node-specifier.ts Outdated Show resolved Hide resolved
src/support/resolve-node-specifier.ts Outdated Show resolved Hide resolved
Copy link
Member

@aomarks aomarks left a comment

Choose a reason for hiding this comment

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

3 pending minor comments from me (in the package.json and the tsconfig), but otherwise LGTM!

src/koa-node-resolve.ts Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
src/koa-module-specifier-transform.ts Outdated Show resolved Hide resolved
@usergenic
Copy link
Collaborator Author

FYI: I now log errors in the middleware and then leave the response body alone; errors either from parsing or specifier resolution won't blow up the request handler anymore.

@usergenic usergenic merged commit c0456c9 into master May 21, 2019
@usergenic usergenic deleted the version-one branch May 21, 2019 22:44
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.

4 participants