Convert the scripts to TypeScript#3675
Conversation
script/publish.ts
Outdated
| const input = Fs.createReadStream(assetPath) | ||
|
|
||
| hash.on('finish', () => { | ||
| const sha = hash.read().toString('hex') |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
package.json
Outdated
| "eslint:fix": "yarn eslint --fix", | ||
| "eslint-check": "eslint --print-config .eslintrc.* | eslint-config-prettier-check", | ||
| "publish": "node script/publish", | ||
| "publish": "ts-node script/publish", |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
script/debug.ts
Outdated
| @@ -0,0 +1,37 @@ | |||
| 'use strict' | |||
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
Depends on |
|
🔷 |
|
|
|
a02d8c4 now merges the Webpack 4 changes into this PR, and there's a couple of type errors that are outstanding now - almost ready for another round of review! |
|
Alright, I'm dropping myself as a reviewer because I've been heavily involved in this, but I think this is close to merging in. Could someone else give this a pass and a 👍? |
|
Friendly bump on this @desktop/core - would love to figure out if we can land this soon |
|
|
||
| import { forceUnwrap as u } from '../app/src/lib/fatal-error' | ||
|
|
||
| import configs = require('../app/webpack.development') |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
script/start.ts
Outdated
|
|
||
| function startApp() { | ||
| const runningApp = run({ stdio: 'inherit' }) | ||
| if (!runningApp) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
tsconfig.json
Outdated
| "app/**/*.ts", | ||
| "app/**/*.tsx", | ||
| "app/**/*.d.tsx", | ||
| "app/webpack.*.ts" |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
script/publish.ts
Outdated
| s3.upload( | ||
| uploadParams, | ||
| (error: Error, data: AWS.S3.ManagedUpload.SendData) => { | ||
| if (error) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
script/publish.ts
Outdated
| sha = sha.substr(0, 8) | ||
| const sha = getSha().substr(0, 8) | ||
|
|
||
| const getSecret = () => { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
script/publish.ts
Outdated
| cp.execSync('yarn package') | ||
| execSync('yarn package') | ||
|
|
||
| const getSha = () => { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
script/publish.ts
Outdated
| if ( | ||
| !currentTipSHA || | ||
| !currentTipSHA.toUpperCase().startsWith(releaseSHA.toUpperCase()) | ||
| !currentTipSHA.toUpperCase().startsWith(releaseSHA!.toUpperCase()) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
Thanks @j-f1 for this work! |

Fixes #48.
TODO:
app-info.jsgit-info.jspackage-info.jsdev-commands-global.jswebpack.*.jsdebug(importsexpress,webpack,webpack-dev-middleware, andwebpack-hot-middleware) (maybe merge withstart?)dist-info.jslicense-overrides.js(depended upon bybuild.ts) (indirectly depends onlegal-eaglewhichhas nohas TYPES at@typespackage defined@types/legal-eagle)publish(importsaws-sdkandrequest)run.js(depended upon bystart)start(importsexpress,webpack,webpack-dev-middleware, andwebpack-hot-middleware)