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

Step 2: Publish ECMAScript modules #999

Merged
merged 5 commits into from Nov 30, 2019
Merged

Step 2: Publish ECMAScript modules #999

merged 5 commits into from Nov 30, 2019

Conversation

acao
Copy link
Member

@acao acao commented Nov 17, 2019

  • publish ecmascript modules
  • for typescript, add tons of extra tsconfig so we can support esm modules (is there any way to do this besides those rollup abstractions like microbundle/etc?)
  • share babel config that honors ESM variable
  • copy modules to codemirror-graphql in an expected relative fashion (using a new shared script for rewriting file paths and extensions)

@acao acao changed the title Publish ECMAScript modules Step 2: Publish ECMAScript modules Nov 17, 2019
@acao acao changed the base branch from master to fix/882-webpack-resolutions November 17, 2019 16:42
@acao acao force-pushed the chore/esm-build branch 2 times, most recently from e225d56 to e8ca1cf Compare November 17, 2019 16:55
@codecov
Copy link

codecov bot commented Nov 17, 2019

Codecov Report

Merging #999 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #999   +/-   ##
=======================================
  Coverage   43.55%   43.55%           
=======================================
  Files          66       66           
  Lines        2994     2994           
  Branches      647      647           
=======================================
  Hits         1304     1304           
  Misses       1421     1421           
  Partials      269      269

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e38e441...7021e10. Read the comment docs.

@acao acao force-pushed the chore/esm-build branch 3 times, most recently from ee04d30 to f97c273 Compare November 18, 2019 00:44
Copy link
Member

@benjie benjie left a comment

Choose a reason for hiding this comment

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

This one requires a few more changes, I'm afraid. Sorry!

packages/codemirror-graphql/.npmignore Outdated Show resolved Hide resolved
packages/codemirror-graphql/package.json Outdated Show resolved Hide resolved
packages/codemirror-graphql/package.json Outdated Show resolved Hide resolved
packages/examples/graphiql-cdn/index.html Show resolved Hide resolved
packages/graphiql/.babelrc.js Outdated Show resolved Hide resolved
packages/graphql-language-service-types/package.json Outdated Show resolved Hide resolved
packages/graphql-language-service-types/package.json Outdated Show resolved Hide resolved
packages/graphql-language-service-utils/package.json Outdated Show resolved Hide resolved
packages/graphql-language-service/package.json Outdated Show resolved Hide resolved
resources/renameFileExtensions.js Outdated Show resolved Hide resolved
@acao acao force-pushed the chore/esm-build branch 2 times, most recently from d4cd80d to ff26e16 Compare November 19, 2019 17:40
.eslintrc.js Outdated Show resolved Hide resolved
@acao acao force-pushed the chore/esm-build branch 6 times, most recently from 1538a0c to 915a595 Compare November 20, 2019 03:23
@acao acao force-pushed the fix/882-webpack-resolutions branch from 7ba107d to 745cec2 Compare November 20, 2019 03:33
@acao acao force-pushed the fix/882-webpack-resolutions branch from 745cec2 to a895dd7 Compare November 20, 2019 03:55
@acao acao force-pushed the chore/esm-build branch 2 times, most recently from 6ac573e to 91c6340 Compare November 20, 2019 04:20
@acao acao changed the base branch from fix/882-webpack-resolutions to master November 20, 2019 18:40
benjie
benjie previously requested changes Nov 22, 2019
Copy link
Member

@benjie benjie left a comment

Choose a reason for hiding this comment

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

Few more changes needed; getting there!

packages/codemirror-graphql/package.json Show resolved Hide resolved
.graphiql-container .spinner-container{height:36px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:36px;z-index:10}.graphiql-container .spinner{animation:rotation .6s linear infinite;border-radius:100%;border:6px solid hsla(0,0%,58.8%,.15);border-top-color:hsla(0,0%,58.8%,.8);display:inline-block;height:24px;position:absolute;vertical-align:middle;width:24px}@keyframes rotation{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}
.CodeMirror-hints{background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.45);font-family:Consolas,Inconsolata,Droid Sans Mono,Monaco,monospace;font-size:13px;list-style:none;margin:0;max-height:14.5em;overflow-y:auto;overflow:hidden;padding:0;position:absolute;z-index:10}.CodeMirror-hint{border-top:1px solid #f7f7f7;color:#141823;cursor:pointer;margin:0;max-width:300px;overflow:hidden;padding:2px 6px;white-space:pre}li.CodeMirror-hint-active{background-color:#08f;border-top-color:#fff;color:#fff}.CodeMirror-hint-information{border-top:1px solid silver;max-width:300px;padding:4px 6px;position:relative;z-index:1}.CodeMirror-hint-information:first-child{border-bottom:1px solid silver;border-top:none;margin-bottom:-1px}.CodeMirror-hint-deprecation{background:#fffae8;box-shadow:inset 0 1px 1px -1px #bfb063;color:#867f70;font-family:system,-apple-system,San Francisco,\.SFNSDisplay-Regular,Segoe UI,Segoe,Segoe WP,Helvetica Neue,helvetica,Lucida Grande,arial,sans-serif;font-size:13px;line-height:16px;margin-top:4px;max-height:80px;overflow:hidden;padding:6px}.CodeMirror-hint-deprecation .deprecation-label{color:#c79b2e;cursor:default;display:block;font-size:9px;font-weight:700;letter-spacing:1px;line-height:1;padding-bottom:5px;text-transform:uppercase;user-select:none}.CodeMirror-hint-deprecation .deprecation-label+*{margin-top:0}.CodeMirror-hint-deprecation :last-child{margin-bottom:0}
.graphiql-container .doc-explorer{background:#fff}.graphiql-container .doc-explorer-title-bar,.graphiql-container .history-title-bar{cursor:default;display:flex;height:34px;line-height:14px;padding:8px 8px 5px;position:relative;user-select:none}.graphiql-container .doc-explorer-title,.graphiql-container .history-title{flex:1;font-weight:700;overflow-x:hidden;padding:10px 0 10px 10px;text-align:center;text-overflow:ellipsis;user-select:text;white-space:nowrap}.graphiql-container .doc-explorer-back{color:#3b5998;cursor:pointer;margin:-7px 0 -6px -8px;overflow-x:hidden;padding:17px 12px 16px 16px;text-overflow:ellipsis;white-space:nowrap;background:0;border:0;line-height:14px}.doc-explorer-narrow .doc-explorer-back{width:0}.graphiql-container .doc-explorer-back:before{border-left:2px solid #3b5998;border-top:2px solid #3b5998;content:"";display:inline-block;height:9px;margin:0 3px -1px 0;position:relative;transform:rotate(-45deg);width:9px}.graphiql-container .doc-explorer-rhs{position:relative}.graphiql-container .doc-explorer-contents,.graphiql-container .history-contents{background-color:#fff;border-top:1px solid #d6d6d6;bottom:0;left:0;overflow-y:auto;padding:20px 15px;position:absolute;right:0;top:47px}.graphiql-container .doc-explorer-contents{min-width:300px}.graphiql-container .doc-type-description blockquote:first-child,.graphiql-container .doc-type-description p:first-child{margin-top:0}.graphiql-container .doc-explorer-contents a{cursor:pointer;text-decoration:none}.graphiql-container .doc-explorer-contents a:hover{text-decoration:underline}.graphiql-container .doc-value-description>:first-child{margin-top:4px}.graphiql-container .doc-value-description>:last-child{margin-bottom:4px}.graphiql-container .doc-category code,.graphiql-container .doc-category pre,.graphiql-container .doc-type-description code,.graphiql-container .doc-type-description pre{--saf-0:rgba(var(--sk_foreground_low,29,28,29),0.13);font-size:12px;line-height:1.50001;font-variant-ligatures:none;white-space:pre;white-space:pre-wrap;word-wrap:break-word;word-break:normal;-webkit-tab-size:4;-moz-tab-size:4;tab-size:4}.graphiql-container .doc-category code,.graphiql-container .doc-type-description code{padding:2px 3px 1px;border:1px solid var(--saf-0);border-radius:3px;background-color:rgba(var(--sk_foreground_min,29,28,29),.04);color:#e01e5a;background-color:#fff}.graphiql-container .doc-category{margin:20px 0}.graphiql-container .doc-category-title{border-bottom:1px solid #e0e0e0;color:#777;cursor:default;font-size:14px;font-variant:small-caps;font-weight:700;letter-spacing:1px;margin:0 -15px 10px 0;padding:10px 0;user-select:none}.graphiql-container .doc-category-item{margin:12px 0;color:#555}.graphiql-container .keyword{color:#b11a04}.graphiql-container .type-name{color:#ca9800}.graphiql-container .field-name{color:#1f61a0}.graphiql-container .field-short-description{color:#999;margin-left:5px;overflow:hidden;text-overflow:ellipsis}.graphiql-container .enum-value{color:#0b7fc7}.graphiql-container .arg-name{color:#8b2bb9}.graphiql-container .arg{display:block;margin-left:1em}.graphiql-container .arg:first-child:last-child,.graphiql-container .arg:first-child:nth-last-child(2),.graphiql-container .arg:first-child:nth-last-child(2)~.arg{display:inherit;margin:inherit}.graphiql-container .arg:first-child:nth-last-child(2):after{content:", "}.graphiql-container .arg-default-value{color:#43a047}.graphiql-container .doc-deprecation{background:#fffae8;box-shadow:inset 0 0 1px #bfb063;color:#867f70;line-height:16px;margin:8px -8px;max-height:80px;overflow:hidden;padding:8px;border-radius:3px}.graphiql-container .doc-deprecation:before{content:"Deprecated:";color:#c79b2e;cursor:default;display:block;font-size:9px;font-weight:700;letter-spacing:1px;line-height:1;padding-bottom:5px;text-transform:uppercase;user-select:none}.graphiql-container .doc-deprecation>:first-child{margin-top:0}.graphiql-container .doc-deprecation>:last-child{margin-bottom:0}.graphiql-container .show-btn{-webkit-appearance:initial;display:block;border-radius:3px;border:1px solid #ccc;text-align:center;padding:8px 12px 10px;width:100%;box-sizing:border-box;background:#fbfcfc;color:#555;cursor:pointer}.graphiql-container .search-box{border-bottom:1px solid #d3d6db;display:block;font-size:14px;margin:-15px -15px 12px 0;position:relative}.graphiql-container .search-box-icon{cursor:pointer;display:block;font-size:24px;position:absolute;top:-2px;transform:rotate(-45deg);user-select:none}.graphiql-container .search-box .search-box-clear{background-color:#d0d0d0;border-radius:12px;color:#fff;cursor:pointer;font-size:11px;padding:1px 5px 2px;position:absolute;right:3px;top:8px;user-select:none;border:0}.graphiql-container .search-box .search-box-clear:hover{background-color:#b9b9b9}.graphiql-container .search-box>input{border:none;box-sizing:border-box;font-size:14px;outline:none;padding:6px 24px 8px 20px;width:100%}.graphiql-container .error-container{font-weight:700;left:0;letter-spacing:1px;opacity:.5;position:absolute;right:0;text-align:center;text-transform:uppercase;top:50%;transform:translateY(-50%)}
.graphiql-container .history-contents{font-family:Consolas,Inconsolata,Droid Sans Mono,Monaco,monospace;margin:0;padding:0}.graphiql-container .history-contents li{align-items:center;display:flex;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0;padding:8px;border-bottom:1px solid #e0e0e0}.graphiql-container .history-contents li button:not(.history-label){display:none;margin-left:10px}.graphiql-container .history-contents li:focus-within button:not(.history-label),.graphiql-container .history-contents li:hover button:not(.history-label){display:inline-block}.graphiql-container .history-contents button,.graphiql-container .history-contents input{padding:0;background:0;border:0;font-size:inherit;font-family:inherit;line-height:14px;color:inherit}.graphiql-container .history-contents input{flex-grow:1}.graphiql-container .history-contents input::placeholder{color:inherit}.graphiql-container .history-contents button{cursor:pointer;text-align:left}.graphiql-container .history-contents .history-label{flex-grow:1;overflow:hidden;text-overflow:ellipsis}
Copy link
Member

Choose a reason for hiding this comment

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

Is this intended to be included in git?

packages/graphiql/package.json Show resolved Hide resolved
@acao acao force-pushed the chore/esm-build branch 2 times, most recently from 0bd59f2 to 1b8151b Compare November 23, 2019 03:17
@acao acao force-pushed the chore/esm-build branch 2 times, most recently from df69c7f to 3c99618 Compare November 27, 2019 00:30
Copy link
Member

@orta orta left a comment

Choose a reason for hiding this comment

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

Looks good, I've given it a run through locally and looks at some of the results via npm pack and they seem legit to me.

We should get this rebased and merged.

@@ -1,7 +1,13 @@

// for ESM don't transpile modules
Copy link
Member

Choose a reason for hiding this comment

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

This might bite us later down the line with TypeScript?

Copy link
Member Author

Choose a reason for hiding this comment

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

needed for tree shaking, and besides we still have a cjs build at the same path

@acao
Copy link
Member Author

acao commented Nov 30, 2019

@orta thank you! gonna resolve these conflicts from dependabot merges

@acao acao merged commit 200c7e4 into master Nov 30, 2019
@acao acao deleted the chore/esm-build branch December 2, 2019 01:59
@acao acao added this to Done in Webpack takeover Dec 2, 2019
@acao acao added this to the GraphiQL-1.0.0-beta milestone Mar 14, 2020
Sweetabix1 pushed a commit to Sweetabix1/graphiql that referenced this pull request Jun 4, 2021
acao added a commit that referenced this pull request Oct 29, 2021
* fix: updating #999 font colors to #666

Co-authored-by: Dan Sweeney <dsweeney@poppulo.com>
Co-authored-by: Rikki Schulte <rikki.schulte@gmail.com>
@github-actions github-actions bot mentioned this pull request Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants