Skip to content

Commit

Permalink
Upgrade typescript & other packages (#157)
Browse files Browse the repository at this point in the history
* Make change to assume dest folder. Delete 2 old tests that looked for old behavior, add 2 more tests that look for new behavior

* Sort files

* Update src/RokuDeploy.ts

Co-authored-by: Bronley Plumb <[email protected]>

* Removed redundant entry.dest is null situation

* Added a few commands, not all are working correctly

* Move commands to their own file

* More command files

* Change commands to help with tests

* Add testing suite for all cli (2 tests are not working)

* Updated cli file after adding in commands and tests

* Fixed a few test cases

* Change name and input of table helper

* Totally broken code, but have the right names

* Changed name of toTable

* Make test for objectToTable

* add yargs to pacjage.json

* add package-lock.json

* add new line at eof

* Add test for coverage, also remove an unncessary '?'

* tweaks

* tweaks

* get from json stuff

* Correct imports

* Last of the fsExtra changes

* Create a load from json util, clean up cli.ts file with fleshing out comments, delete unnecessary command/tests/options, partially fix exec command

* Adding cli tests

* Delete deployAndSignPackage tests, a deleted function in rokudeploy

* Add defaultsFromJson tests

* Move some tests to utils test file, re add other functions that might have been accidentally deleted, fix some errors with fsExtra

* Change signExistingPackage to CreateSignedPackage

* Delete retrieveSignedPackage

* Move getFilePaths

* Random changes I forgot to put in the other pushes

* Change to different notation since getOutputZipFilePath and getOutputPkgPath were made private

* Change notation for normalizeDeviceInfoFieldValue since it was made privete

* Change notation for parsedManifestFromString and ParseManifest since being made private

* Change deleteInstalledChannel to deleteDevChannel, other small changes

* Add stagingDir, fix zip/deleteDevChannel/captureScreenshot function calls, delete Deploy function

* Fix commands

* change defaults from json function, fix some tests

* fix index, fix makezip, getfilepaths, sideload

* Add options from json ability to each command to each command

* remove bsconfig, fix cli file with key press commands, fix key press functions and add options

* fix getoptionsfromjson

* delete unnecessary commands, fix some tests

* change to captureScreenshot

* Fix a bunch of tests

* Fix up the last few tests and cli commands

* Changing coverage check to false

* Fix failing tests on windows

* Delete comment

* Change publish to sideload everywhere else

* Move deploy tests to test exec command

* Throw new error for wrong device id, and add test to test for it

* Delete creating variable options since it was unused

* Add function description

* Inline exec command options

* Remove retainsStagingDir, zipCallBackInfo, incrementBuildNumber, and add back tests for createPackage

* Delete convertToSquashfs, move deployAndSignPackage tests to cli, move retrieveSignedPackage tests to under createSignedPackage

* Change prepublishToStaging to stage

* Change the way close channel works

* Update src/RokuDeploy.ts

Co-authored-by: Bronley Plumb <[email protected]>

* Add outFile to Zip, delete zipPackage

* StagingDir is defaulted anyway so this error will never occur

* Delete MissingRequiredOptionError

* Add checkRequiredOptions function to test for required options

* Add checking for required options in sendKeyEvent function, start testing

* Add check for if options are part of the defined interface that they are being called with

* Add check for various required options and add tests for each one

* take out it.only in tests

* Delete old MissingRequiredOptionError tests

* fix tests

* Fix lint error

* Upgrade as many packages as possible, delete chalk stub

* Bring back chalk by downgrading sinon to v12

* New package-lock

* Upgrade node to 14.7.0

* Undo last commit wrong branch

* Upgrade node in build script to 14.17

* Get rid of individual options checks

* Fixed option type in tests function

* Fixing eslint libraries to be compatible with the version of node we are using

* Fix lint errors: sorting unions and importing types in the same line as packages

* Fix lint errors: lines around comments set to false, prefer nullish coalescing set to false, propert results should be set as a class property, optional chaining, and no redundant types

* Fix 2 more lint errors

* Fix jszip error

* Undo last change

* Turn off prefer optional chain

* Disable duplicate imports error one time

* move eslint to a dev dependency

* Fix eslint errors

* Added npm install package lock, which actually fixed a different issue

* add eslint plugin import, fix logical-assignment-operators error

---------

Co-authored-by: Bronley Plumb <[email protected]>
  • Loading branch information
MilapNaik and TwitchBronBron authored Apr 1, 2024
1 parent ab389e0 commit 9ba9034
Show file tree
Hide file tree
Showing 10 changed files with 2,106 additions and 5,360 deletions.
9 changes: 7 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ module.exports = {
project: './tsconfig.json'
},
plugins: [
'@typescript-eslint'
'@typescript-eslint',
'import'
],
extends: [
'eslint:all',
Expand All @@ -23,6 +24,7 @@ module.exports = {
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/init-declarations': 'off',
'@typescript-eslint/lines-around-comment': 'off',
'@typescript-eslint/member-ordering': 'off',
"@typescript-eslint/naming-convention": 'off',
'@typescript-eslint/no-base-to-string': 'off',
Expand Down Expand Up @@ -52,6 +54,8 @@ module.exports = {
'error',
'always'
],
'@typescript-eslint/prefer-nullish-coalescing': 'off',
"@typescript-eslint/prefer-optional-chain": 'off',
'@typescript-eslint/prefer-readonly': 'off',
'@typescript-eslint/prefer-readonly-parameter-types': 'off',
'@typescript-eslint/promise-function-async': 'off',
Expand Down Expand Up @@ -90,11 +94,11 @@ module.exports = {
'function-paren-newline': 'off',
'guard-for-in': 'off',
'id-length': 'off',
'import/no-duplicates': 'error',
'indent': 'off',
'init-declarations': 'off',
'line-comment-position': 'off',
'linebreak-style': 'off',
'lines-around-comment': 'off',
'lines-between-class-members': 'off',
'max-classes-per-file': 'off',
'max-depth': 'off',
Expand All @@ -112,6 +116,7 @@ module.exports = {
'no-constant-condition': 'off',
'no-console': 'off',
'no-continue': 'off',
'no-duplicate-imports': 'off',
'no-else-return': 'off',
'no-empty': 'off',
'no-implicit-coercion': 'off',
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: "12.22.7"
node-version: "14.17.0"
- run: cd src && cd .. #trying to fix "ENOENT: no such file or directory, uv_cwd" error
- run: npm ci
- run: npm run build
Expand All @@ -38,7 +38,7 @@ jobs:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: "10.19.0"
node-version: "14.17.0"
- run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ./.npmrc
- run: npm ci
- run: npm run build
Expand Down
Loading

0 comments on commit 9ba9034

Please sign in to comment.