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

build: use @tsconfig/node12 config #626

Merged
merged 3 commits into from
Jan 22, 2022
Merged

build: use @tsconfig/node12 config #626

merged 3 commits into from
Jan 22, 2022

Conversation

nogic1008
Copy link
Contributor

No description provided.

@commit-lint
Copy link

commit-lint bot commented Jan 22, 2022

Chore

  • deps-dev: add @tsconfig/node12 package (909af03)

Build System

  • tsc: use @tsconfig/node12 on tsconfig.json (4c65b75)
  • set build target to es2019 (65aa445)

Contributors

nogic1008

Commit-Lint commands

You can trigger Commit-Lint actions by commenting on this PR:

  • @Commit-Lint merge patch will merge dependabot PR on "patch" versions (X.X.Y - Y change)
  • @Commit-Lint merge minor will merge dependabot PR on "minor" versions (X.Y.Y - Y change)
  • @Commit-Lint merge major will merge dependabot PR on "major" versions (Y.Y.Y - Y change)
  • @Commit-Lint merge disable will desactivate merge dependabot PR
  • @Commit-Lint review will approve dependabot PR
  • @Commit-Lint stop review will stop approve dependabot PR

@nogic1008 nogic1008 added this to the v1.3.4 milestone Jan 22, 2022
@nogic1008 nogic1008 added development 🚀 Area development (testing, deploy...) refactoring ✨ Not a new feature (code clean, remove dup...) labels Jan 22, 2022
@codecov
Copy link

codecov bot commented Jan 22, 2022

Codecov Report

Merging #626 (65aa445) into main (f533070) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #626   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines           55        55           
  Branches         8         8           
=========================================
  Hits            55        55           

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 f533070...65aa445. Read the comment docs.

@github-actions
Copy link

There is a difference in the build results.

Diff
diff --git a/./dist/index.js b/./current/index.js
index f7e4a44..03e0a15 100644
--- a/./dist/index.js
+++ b/./current/index.js
@@ -5099,6 +5099,80 @@
                 }
             }
         },
+        213: (e, r, t) => {
+            "use strict";
+            Object.defineProperty(r, "__esModule", {
+                value: true
+            });
+            r.getEventWebhook = r.isSupportedEvent = void 0;
+            const s = t(438);
+            const o = new Set(["issue_comment", "pull_request_review"]);
+
+            function isSupportedEvent(e) {
+                return o.has(e)
+            }
+            r.isSupportedEvent = isSupportedEvent;
+
+            function getEventWebhook(e) {
+                switch (e) {
+                    case "issue_comment": {
+                        const e = s.context.payload;
+                        return {
+                            comment: e.comment.body,
+                            issueNumber: e.issue.number
+                        }
+                    }
+                    case "pull_request_review": {
+                        const e = s.context.payload;
+                        return {
+                            comment: e.review.body,
+                            issueNumber: e.pull_request.number
+                        }
+                    }
+                }
+            }
+            r.getEventWebhook = getEventWebhook
+        },
+        455: (e, r, t) => {
+            "use strict";
+            Object.defineProperty(r, "__esModule", {
+                value: true
+            });
+            r.getInputParams = void 0;
+            const s = t(186);
+
+            function getInputParams() {
+                const e = (0, s.getInput)("token");
+                const r = (0, s.getInput)("image-url", {
+                    required: true
+                });
+                const t = (0, s.getMultilineInput)("search-pattern");
+                return {
+                    token: e,
+                    imageUrl: r,
+                    searchPattern: t.length ? t.map((e => new RegExp(e, "m"))) : [/^(lgtm|LGTM)$/m]
+                }
+            }
+            r.getInputParams = getInputParams
+        },
+        975: (e, r, t) => {
+            "use strict";
+            Object.defineProperty(r, "__esModule", {
+                value: true
+            });
+            r.sendCommentAsync = void 0;
+            const s = t(438);
+            async function sendCommentAsync(e, r, t, o, n) {
+                const i = (0, s.getOctokit)(e);
+                await i.rest.issues.createComment({
+                    owner: r,
+                    repo: t,
+                    issue_number: o,
+                    body: n
+                })
+            }
+            r.sendCommentAsync = sendCommentAsync
+        },
         877: module => {
             module.exports = eval("require")("encoding")
         },
@@ -5173,127 +5247,60 @@
             if (s) delete __webpack_module_cache__[e]
         }
         return t.exports
-    }(() => {
-        __nccwpck_require__.d = (e, r) => {
-            for (var t in r) {
-                if (__nccwpck_require__.o(r, t) && !__nccwpck_require__.o(e, t)) {
-                    Object.defineProperty(e, t, {
-                        enumerable: true,
-                        get: r[t]
-                    })
-                }
-            }
-        }
-    })();
-    (() => {
-        __nccwpck_require__.o = (e, r) => Object.prototype.hasOwnProperty.call(e, r)
-    })();
-    (() => {
-        __nccwpck_require__.r = e => {
-            if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
-                Object.defineProperty(e, Symbol.toStringTag, {
-                    value: "Module"
-                })
-            }
-            Object.defineProperty(e, "__esModule", {
-                value: true
-            })
-        }
-    })();
+    }
     if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = __dirname + "/";
     var __webpack_exports__ = {};
     (() => {
         "use strict";
-        __nccwpck_require__.r(__webpack_exports__);
-        __nccwpck_require__.d(__webpack_exports__, {
-            run: () => run
+        var e = __webpack_exports__;
+        Object.defineProperty(e, "__esModule", {
+            value: true
         });
-        var e = __nccwpck_require__(186);
-        var r = __nccwpck_require__(438);
-        const t = new Set(["issue_comment", "pull_request_review"]);
-
-        function isSupportedEvent(e) {
-            return t.has(e)
-        }
-
-        function getEventWebhook(e) {
-            switch (e) {
-                case "issue_comment": {
-                    const e = r.context.payload;
-                    return {
-                        comment: e.comment.body,
-                        issueNumber: e.issue.number
-                    }
-                }
-                case "pull_request_review": {
-                    const e = r.context.payload;
-                    return {
-                        comment: e.review.body,
-                        issueNumber: e.pull_request.number
-                    }
-                }
-            }
-        }
-
-        function getInputParams() {
-            const r = (0, e.getInput)("token");
-            const t = (0, e.getInput)("image-url", {
-                required: true
-            });
-            const s = (0, e.getMultilineInput)("search-pattern");
-            return {
-                token: r,
-                imageUrl: t,
-                searchPattern: s.length ? s.map((e => new RegExp(e, "m"))) : [/^(lgtm|LGTM)$/m]
-            }
-        }
-        async function sendCommentAsync(e, t, s, o, n) {
-            const i = (0, r.getOctokit)(e);
-            await i.rest.issues.createComment({
-                owner: t,
-                repo: s,
-                issue_number: o,
-                body: n
-            })
-        }
+        e.run = void 0;
+        const r = __nccwpck_require__(186);
+        const t = __nccwpck_require__(438);
+        const s = __nccwpck_require__(213);
+        const o = __nccwpck_require__(455);
+        const n = __nccwpck_require__(975);
         async function run() {
             try {
-                const t = r.context.eventName;
+                const e = t.context.eventName;
                 const {
-                    owner: s,
-                    repo: o
-                } = r.context.repo;
-                (0, e.debug)(`context: { eventName: "${t}", repository: "${s}/${o}" }`);
-                if (!isSupportedEvent(t)) {
-                    (0, e.warning)(`Not supported Event: ${t}`);
+                    owner: i,
+                    repo: a
+                } = t.context.repo;
+                (0, r.debug)(`context: { eventName: "${e}", repository: "${i}/${a}" }`);
+                if (!(0, s.isSupportedEvent)(e)) {
+                    (0, r.warning)(`Not supported Event: ${e}`);
                     return
                 }
                 const {
-                    token: n,
-                    imageUrl: i,
-                    searchPattern: a
-                } = getInputParams();
+                    token: c,
+                    imageUrl: u,
+                    searchPattern: p
+                } = (0, o.getInputParams)();
                 const {
-                    comment: c,
-                    issueNumber: u
-                } = getEventWebhook(t);
-                (0, e.debug)(`webhook: { comment: "${c}", issueNumber: ${u} }`);
-                if (!c) {
-                    (0, e.info)("Comment is null or empty.");
+                    comment: l,
+                    issueNumber: d
+                } = (0, s.getEventWebhook)(e);
+                (0, r.debug)(`webhook: { comment: "${l}", issueNumber: ${d} }`);
+                if (!l) {
+                    (0, r.info)("Comment is null or empty.");
                     return
                 }
-                for (const r of a) {
-                    if (r.test(c)) {
-                        (0, e.info)(`Comment matches pattern: ${r}`);
-                        const t = `![LGTM](${i})`;
-                        await sendCommentAsync(n, s, o, u, t);
+                for (const e of p) {
+                    if (e.test(l)) {
+                        (0, r.info)(`Comment matches pattern: ${e}`);
+                        const t = `![LGTM](${u})`;
+                        await (0, n.sendCommentAsync)(c, i, a, d, t);
                         return
                     }
-                }(0, e.info)("Comment does not match pattern.")
-            } catch (r) {
-                (0, e.setFailed)(r instanceof Error ? r : `${r}`)
+                }(0, r.info)("Comment does not match pattern.")
+            } catch (e) {
+                (0, r.setFailed)(e instanceof Error ? e : `${e}`)
             }
         }
+        e.run = run;
         run()
     })();
     module.exports = __webpack_exports__

@nogic1008 nogic1008 merged commit f36ad1f into main Jan 22, 2022
@nogic1008 nogic1008 deleted the build/tsconfig-node12 branch January 22, 2022 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development 🚀 Area development (testing, deploy...) refactoring ✨ Not a new feature (code clean, remove dup...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant