From c23f9318989339903180630f2dbe6d02a09a635b Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Thu, 5 Sep 2019 12:48:53 +0930 Subject: [PATCH 1/7] add modclean to build process Signed-off-by: Alexis Tyler --- .github/workflows/production.yml | 2 + package.json | 3 +- yarn.lock | 93 ++++++++++++++++++++++++++++++-- 3 files changed, 93 insertions(+), 5 deletions(-) diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index a17693a79..7eb259ec8 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -31,6 +31,8 @@ jobs: chmod 600 ~/.ssh/id_rsa - name: Installing node deps run: npm install + - name: Remove unneeded files + run: modclean --no-progress --run --path . - name: Packing release run: npm pack - name: Uploading release to Github diff --git a/package.json b/package.json index 428943f7c..0c49f0d61 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,8 @@ }, "optionalDependencies": {}, "devDependencies": { - "bundle-dependencies": "^1.0.2" + "bundle-dependencies": "^1.0.2", + "modclean": "^3.0.0-beta.1" }, "bundledDependencies": [ "@unraid/core", diff --git a/yarn.lock b/yarn.lock index e0f3c6840..e411db9f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -877,6 +877,11 @@ atob@^2.1.1: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== +await-handler@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/await-handler/-/await-handler-1.1.2.tgz#329c19e9382599898bc12c80c47efdcdaa1b4992" + integrity sha512-dihteGhwbJpT89kVbacWiyKeAZr+En0YGK6pAKQJLR0En9ZxSH2H4TTvfG4bBjzFq9gDAma4y9BrpDns6j5UiQ== + aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" @@ -1173,7 +1178,7 @@ catharsis@^0.8.11: dependencies: lodash "^4.17.14" -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.1, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -1258,6 +1263,11 @@ cli-cursor@^2.1.0: dependencies: restore-cursor "^2.0.0" +cli-spinners@^1.1.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-1.3.1.tgz#002c1990912d0d59580c93bd36c056de99e4259a" + integrity sha512-1QL4544moEsDVH9T/l6Cemov/37iv1RtoKf7NJ04A60+4MREXNfx/QvavbH6QoGdsD4N4Mwy49cmaINR/o2mdg== + cli-table@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23" @@ -1295,6 +1305,11 @@ clone-response@^1.0.2: dependencies: mimic-response "^1.0.0" +clone@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= + code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" @@ -1342,7 +1357,7 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@~2.20.0: +commander@^2.9.0, commander@~2.20.0: version "2.20.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== @@ -1619,6 +1634,13 @@ default-require-extensions@^2.0.0: dependencies: strip-bom "^3.0.0" +defaults@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= + dependencies: + clone "^1.0.2" + defer-to-connect@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.0.2.tgz#4bae758a314b034ae33902b5aac25a8dd6a8633e" @@ -1783,6 +1805,11 @@ emoji-regex@^7.0.1: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== +empty-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/empty-dir/-/empty-dir-1.0.0.tgz#be3ea41ca6798dc27bb9407f035888150e4c2995" + integrity sha512-97qcDM6mUA1jAeX6cktw7akc5awIGA+VIkA5MygKOKA+c2Vseo/xwKN0JNJTUhZUtPwZboKVD2p1xu+sV/F4xA== + encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" @@ -1845,6 +1872,11 @@ es6-error@^4.0.1: resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d" integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg== +es6-promise@^3.0.2: + version "3.3.1" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613" + integrity sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM= + escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -3818,6 +3850,11 @@ lodash.sortby@^4.7.0: resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= +lodash.uniq@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" + integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= + lodash.upperfirst@^4.2.0: version "4.3.1" resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce" @@ -3833,7 +3870,7 @@ lodash@4.17.15, lodash@^4.0.0, lodash@^4.13.1, lodash@^4.17.11, lodash@^4.17.12, resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== -log-symbols@^2.0.0: +log-symbols@^2.0.0, log-symbols@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== @@ -4123,6 +4160,28 @@ mkdirp@^0.5.0, mkdirp@^0.5.1: dependencies: minimist "0.0.8" +modclean-patterns-default@latest: + version "1.1.2" + resolved "https://registry.yarnpkg.com/modclean-patterns-default/-/modclean-patterns-default-1.1.2.tgz#9b2d53e3abd707edcf0c1501b4d5ac04c947a283" + integrity sha512-h2+ES3SKl+JOtfptJjwJz5fdogFI0byYssw3lXoESNkOcXCnjCvvW6IbMagAKFmfWOx+n9esyomxWP1w4edZjg== + +modclean@^3.0.0-beta.1: + version "3.0.0-beta.1" + resolved "https://registry.yarnpkg.com/modclean/-/modclean-3.0.0-beta.1.tgz#34acdd610f130c2a833dc254486e2a260006d5bf" + integrity sha512-NyJpuqXMUI190sZePU+dBcwlGaqhfFC+UL5WyNSxmNLOHATg9cVSgRpbY+mUbwUj7t5trb4vYscgXArKevYsdA== + dependencies: + await-handler "^1.1.0" + chalk "^2.4.1" + commander "^2.9.0" + empty-dir "^1.0.0" + glob "^7.1.2" + lodash.uniq "^4.5.0" + modclean-patterns-default latest + ora "^2.1.0" + progress "^2.0.0" + rimraf "^2.5.4" + subdirs "^1.0.1" + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -4462,6 +4521,18 @@ optionator@^0.8.2: type-check "~0.3.2" wordwrap "~1.0.0" +ora@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/ora/-/ora-2.1.0.tgz#6caf2830eb924941861ec53a173799e008b51e5b" + integrity sha512-hNNlAd3gfv/iPmsNxYoAPLvxg7HuPozww7fFonMZvL84tP6Ox5igfk5j/+a9rtJJwqMgKK+JgWsAQik5o0HTLA== + dependencies: + chalk "^2.3.1" + cli-cursor "^2.1.0" + cli-spinners "^1.1.0" + log-symbols "^2.2.0" + strip-ansi "^4.0.0" + wcwidth "^1.0.1" + os-homedir@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" @@ -5260,7 +5331,7 @@ rimraf@2.6.3: dependencies: glob "^7.1.3" -rimraf@^2.6.2, rimraf@^2.6.3: +rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -5681,6 +5752,13 @@ strip-json-comments@^3.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7" integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== +subdirs@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/subdirs/-/subdirs-1.0.1.tgz#d65264787476e4caf7efc5498fb740c69f626d48" + integrity sha1-1lJkeHR25Mr378VJj7dAxp9ibUg= + dependencies: + es6-promise "^3.0.2" + subscriptions-transport-ws@^0.9.11, subscriptions-transport-ws@^0.9.16: version "0.9.16" resolved "https://registry.yarnpkg.com/subscriptions-transport-ws/-/subscriptions-transport-ws-0.9.16.tgz#90a422f0771d9c32069294c08608af2d47f596ec" @@ -6142,6 +6220,13 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" +wcwidth@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= + dependencies: + defaults "^1.0.3" + whatwg-fetch@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb" From b069232991f28c8e17cf80ab4e19c6c579764f34 Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Fri, 6 Sep 2019 14:08:42 +0930 Subject: [PATCH 2/7] fix modclean missing by using yarn context Signed-off-by: Alexis Tyler --- .github/workflows/production.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index 7eb259ec8..787af560a 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -32,7 +32,7 @@ jobs: - name: Installing node deps run: npm install - name: Remove unneeded files - run: modclean --no-progress --run --path . + run: npm run build - name: Packing release run: npm pack - name: Uploading release to Github From 9fa13e9f04a3a5300655d5c38bc0b6193ace8083 Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Fri, 6 Sep 2019 14:12:04 +0930 Subject: [PATCH 3/7] try release on tag push Signed-off-by: Alexis Tyler --- .github/workflows/production.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index 787af560a..4fde521c2 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -1,6 +1,9 @@ name: Production -on: [release] +on: + push: + tags: + - '*' jobs: release: From 798ce0e3d9070dec157cb05d8bf767adcc3750d8 Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Fri, 6 Sep 2019 14:12:27 +0930 Subject: [PATCH 4/7] release v1.0.11 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0c49f0d61..cb7562d92 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@unraid/graphql-api", - "version": "1.0.10", + "version": "1.0.11", "main": "index.js", "repository": "git@github.com:unraid/graphql-api.git", "author": "Alexis Tyler (https://wvvw.me/)", From 51f393224d55718f3d080fd6bed96770e3f6f2c4 Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Fri, 6 Sep 2019 14:15:28 +0930 Subject: [PATCH 5/7] add missing script Signed-off-by: Alexis Tyler --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index cb7562d92..bd109fee0 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "scripts": { "dev": "STATES_CWD=$(pwd)/../core/test/fixtures/states CORE_CWD=$(pwd)/../core/ PLUGINS_CWD=$(pwd)/../plugins/ nodemon -e js,graphql --signal SIGINT index.js", "test": "exit 0", - "lint": "exit 0" + "lint": "exit 0", + "build": "modclean --no-progress --run --path ." }, "dependencies": { "@gridplus/docker-events": "^1.0.0", From 906be1c73ad1efd606a399b875061d81099a0dd2 Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Fri, 6 Sep 2019 14:15:58 +0930 Subject: [PATCH 6/7] release v1.0.12 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bd109fee0..7f4a81454 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@unraid/graphql-api", - "version": "1.0.11", + "version": "1.0.12", "main": "index.js", "repository": "git@github.com:unraid/graphql-api.git", "author": "Alexis Tyler (https://wvvw.me/)", From c4e1df20e2720d172dd55c971ea86ea86eafbc9d Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Fri, 6 Sep 2019 14:26:39 +0930 Subject: [PATCH 7/7] try github actions types filter Signed-off-by: Alexis Tyler --- .github/workflows/production.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index 4fde521c2..f31851e41 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -1,9 +1,8 @@ name: Production on: - push: - tags: - - '*' + release: + types: [created] jobs: release: