From 78beffc08b9c80b1f583f41a89258914a1dcb8be Mon Sep 17 00:00:00 2001 From: Guillaume Lebedel Date: Tue, 28 Mar 2023 22:54:57 +0100 Subject: [PATCH 1/4] build: update tsconfic target and remove dist folder from git repo --- .releaserc.json | 2 -- dist/entities/Account.d.ts | 5 ----- dist/entities/Account.d.ts.map | 1 - dist/entities/StartOptions.d.ts | 9 --------- dist/entities/StartOptions.d.ts.map | 1 - dist/index.cjs.js | 1 - dist/index.d.ts | 2 -- dist/index.d.ts.map | 1 - dist/index.esm.js | 1 - dist/useStackOneHub.d.ts | 8 -------- dist/useStackOneHub.d.ts.map | 1 - tsconfig.json | 2 +- 12 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 dist/entities/Account.d.ts delete mode 100644 dist/entities/Account.d.ts.map delete mode 100644 dist/entities/StartOptions.d.ts delete mode 100644 dist/entities/StartOptions.d.ts.map delete mode 100644 dist/index.cjs.js delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.d.ts.map delete mode 100644 dist/index.esm.js delete mode 100644 dist/useStackOneHub.d.ts delete mode 100644 dist/useStackOneHub.d.ts.map diff --git a/.releaserc.json b/.releaserc.json index e26209d..420923c 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -17,8 +17,6 @@ "assets": [ "package.json", "package-lock.json", - "dist/", - "connect.d.ts", "CHANGELOG.md", "README.md" ], diff --git a/dist/entities/Account.d.ts b/dist/entities/Account.d.ts deleted file mode 100644 index 48f19f7..0000000 --- a/dist/entities/Account.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface Account { - id: string; - provider: string; -} -//# sourceMappingURL=Account.d.ts.map \ No newline at end of file diff --git a/dist/entities/Account.d.ts.map b/dist/entities/Account.d.ts.map deleted file mode 100644 index 9f3af80..0000000 --- a/dist/entities/Account.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Account.d.ts","sourceRoot":"","sources":["../../src/entities/Account.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;CACpB"} \ No newline at end of file diff --git a/dist/entities/StartOptions.d.ts b/dist/entities/StartOptions.d.ts deleted file mode 100644 index 1159dfb..0000000 --- a/dist/entities/StartOptions.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Account } from './Account'; -export interface StartOptions { - sessionToken: string; - apiUrl?: string; - onSuccess?: (account: Account) => void; - onCancel?: () => void; - onClose?: () => void; -} -//# sourceMappingURL=StartOptions.d.ts.map \ No newline at end of file diff --git a/dist/entities/StartOptions.d.ts.map b/dist/entities/StartOptions.d.ts.map deleted file mode 100644 index cc4d766..0000000 --- a/dist/entities/StartOptions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StartOptions.d.ts","sourceRoot":"","sources":["../../src/entities/StartOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,WAAW,YAAY;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB"} \ No newline at end of file diff --git a/dist/index.cjs.js b/dist/index.cjs.js deleted file mode 100644 index c51d9bf..0000000 --- a/dist/index.cjs.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var e=require("react");function t(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var r=t(e),n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var c={},i={};!function(t){var r=n&&n.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o{"open"!==t&&"closed"!==t&&(s?"opening"===t&&n("closed"):i||"opening"===t&&o&&(n("open"),Connect.start({...o,onClose:()=>{n("closed"),o.onCancel?.()}})))}),[s,i,t,o]);return{startConnect:r.useCallback((e=>{if(s)throw"Could not initiate StackOne Hub.";"open"!==t&&(c(e),n("opening"))}),[i,s])}}; diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index ee8f879..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { useStackOneHub } from './useStackOneHub'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/index.d.ts.map b/dist/index.d.ts.map deleted file mode 100644 index 555ed9c..0000000 --- a/dist/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"} \ No newline at end of file diff --git a/dist/index.esm.js b/dist/index.esm.js deleted file mode 100644 index cd3e58c..0000000 --- a/dist/index.esm.js +++ /dev/null @@ -1 +0,0 @@ -import*as e from"react";import t from"react";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o={},c={};!function(e){var n=r&&r.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o{"open"!==r&&"closed"!==r&&(a?"opening"===r&&n("closed"):s||"opening"===r&&o&&(n("open"),Connect.start({...o,onClose:()=>{n("closed"),o.onCancel?.()}})))}),[a,s,r,o]);const l=e.useCallback((e=>{if(a)throw"Could not initiate StackOne Hub.";"open"!==r&&(c(e),n("opening"))}),[s,a]);return{startConnect:l}}export{s as useStackOneHub}; diff --git a/dist/useStackOneHub.d.ts b/dist/useStackOneHub.d.ts deleted file mode 100644 index 84b30ab..0000000 --- a/dist/useStackOneHub.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { StartOptions } from './entities/StartOptions'; -declare function useStackOneHub({ connectUrl }?: { - connectUrl?: string; -}): { - startConnect: (options: StartOptions) => void; -}; -export { useStackOneHub }; -//# sourceMappingURL=useStackOneHub.d.ts.map \ No newline at end of file diff --git a/dist/useStackOneHub.d.ts.map b/dist/useStackOneHub.d.ts.map deleted file mode 100644 index 98e8293..0000000 --- a/dist/useStackOneHub.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"useStackOneHub.d.ts","sourceRoot":"","sources":["../src/useStackOneHub.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAIvD,iBAAS,cAAc,CAAC,EAAE,UAAU,EAAE,GAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAO;4BA6BlD,YAAY;EAW7B;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 2f54af4..113bbd9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,7 +11,7 @@ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "esnext" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, + "target": "ES2018" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, "lib": [ "es6", "dom" From c8a1f32030524fd70e28b2fe36c41b7bd81af2cd Mon Sep 17 00:00:00 2001 From: Guillaume Lebedel Date: Tue, 28 Mar 2023 22:55:50 +0100 Subject: [PATCH 2/4] build: remove readme from semantic-release commit --- .releaserc.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.releaserc.json b/.releaserc.json index 420923c..4382963 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -17,8 +17,7 @@ "assets": [ "package.json", "package-lock.json", - "CHANGELOG.md", - "README.md" + "CHANGELOG.md" ], "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" } From 4c87724ba970fed903d803458806a1eb961db2d9 Mon Sep 17 00:00:00 2001 From: Guillaume Lebedel Date: Tue, 28 Mar 2023 23:04:46 +0100 Subject: [PATCH 3/4] fix: build outputs ES2018 compatible code From 5699af8056c88900e9f5170d1f8a0789ad766358 Mon Sep 17 00:00:00 2001 From: Guillaume Lebedel Date: Wed, 29 Mar 2023 15:21:10 +0100 Subject: [PATCH 4/4] fix: change tsconfig target to ES2016 --- tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 113bbd9..a669b19 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,7 +11,7 @@ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "ES2018" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, + "target": "ES2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, "lib": [ "es6", "dom"