Skip to content

Modernization #44

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

Merged
merged 6 commits into from
Sep 4, 2019
Merged

Modernization #44

merged 6 commits into from
Sep 4, 2019

Conversation

jesseditson
Copy link
Contributor

This PR Builds on #31, integrating @nzapponi's original commit and taking it a bit further:

  • remove some deps that are not fair assumptions for all live apps:
    • ajv (unused)
    • @babel/plugin-proposal-class-properties (inheriting apps should explicitly define if they are using this)
    • @babel/polyfill (deprecated, added core-js and regenerator-runtime to fill the same needs)
    • moment (unused)
    • webpack-cli, webpack-dev-server (inheriting apps should just list these as deps. We can add as peerDependencies if it's not obvious)
    • quip-apps-compat (may add back, but want to get our testing story clean without it since it's kind of a hack)
  • respect inheriting apps' .babelrc if provided
  • update to latest version of all deps
  • run quip prettier on webpack.config.js

@jesseditson jesseditson requested a review from elsigh August 23, 2019 00:09
@jesseditson
Copy link
Contributor Author

The most contentious decision in this PR is the removal of quip-apps-compat, which I would propose we remove in favor of some explicit mocks that can be imported in dev/test and which properly respect quip's globals when they exist. This way we wouldn't have any magic globals and we can use jest and other tooling that does not use webpack (closer to) out of the box. I'll build those mocks and either add them to this PR or file a separate one.

@jesseditson jesseditson mentioned this pull request Aug 23, 2019
nzapponi and others added 3 commits August 23, 2019 14:47
- remove some deps that are not fair assumptions for all live apps:
  - ajv (unused)
  - @babel/plugin-proposal-class-properties (inheriting apps should explicitly define if they are using this)
  - @babel/polyfill (deprecated, added core-js and regenerator-runtime to fill the same needs)
  - moment (unused)
  - webpack-cli, webpack-dev-server (inheriting apps should just list these as deps. We can add as peerDependencies if it's not obvious)
  - quip-apps-compat (may add back, but want to get our testing story clean without it since it's kind of a hack)
- respect inheriting apps' .babelrc if provided
- update to latest version of all deps
- run quip prettier on webpack.config.js
This package mocks quip-apps-api in dev, and allows any quip global to override it, causing it to disappear in prod.

The purpose of this library is to allow quip live apps to have explicit dependencies that can compile and run in a node-like environment, like jest.
@jesseditson
Copy link
Contributor Author

@elsigh I'm gonna merge this one now since I've been testing it over on https://github.com/quip/quip/pull/4924 and it's at a point where I trust it while linked, and would like to publish it to a next tag. Unless you tell me otherwise I'll be publishing all of the quip-apps as 1.0.0-alpha.1 under the next tag (so they can be installed via npm i <package-name>@next but won't update existing packages).

@jesseditson
Copy link
Contributor Author

Note that I also have a precog script that will fail commits that cause internal Live Apps API exports to be different than quip-apps-api. An additional future enhancement will be type safety, which will require typescript on both sides, which can happen once we migrate internally.

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.

2 participants