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

Add 'importHelpers: true' to base tsconfig.json #152

Merged
merged 1 commit into from
Dec 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/commons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"types": "dist/commonjs/index.d.ts",
"peerDependencies": {
"@magic-sdk/provider": "^3.0.1",
"@magic-sdk/types": "^2.0.1"
"@magic-sdk/types": "^2.0.1",
"tslib": "^2.0.3"
},
"gitHead": "1ef062ea699d48d5e9a9375a93b7c147632b05ca"
}
3 changes: 2 additions & 1 deletion packages/provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"dependencies": {
"@magic-sdk/types": "^3.0.0",
"eventemitter3": "^4.0.4",
"semver": "^7.3.2"
"semver": "^7.3.2",
"tslib": "^2.0.3"
},
"peerDependencies": {
"localforage": "^1.7.4"
Expand Down
3 changes: 2 additions & 1 deletion packages/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"localforage-driver-memory": "^1.0.5",
"lodash": "^4.17.19",
"process": "~0.11.10",
"whatwg-url": "~8.1.0"
"whatwg-url": "~8.1.0",
"tslib": "^2.0.3"
},
"devDependencies": {
"react": "^16.13.1",
Expand Down
3 changes: 3 additions & 0 deletions packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@
"main": "dist/commonjs/index.js",
"module": "dist/module/index.js",
"types": "dist/commonjs/index.d.ts",
"dependencies": {
"tslib": "^2.0.3"
},
"gitHead": "1ef062ea699d48d5e9a9375a93b7c147632b05ca"
}
3 changes: 2 additions & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"@magic-sdk/types": "^3.0.0",
"localforage": "^1.7.4",
"localforage-driver-memory": "^1.0.5",
"regenerator-runtime": "0.13.5"
"regenerator-runtime": "0.13.5",
"tslib": "^2.0.3"
},
"ava": {
"require": [
Expand Down
8 changes: 3 additions & 5 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ echo
boxen --border-color cyan --dim-border --padding 1 "Building TypeScripts..."
echo

echo "🤔 Determining TypeScript projects to build..."
tsconfig_paths=$(echo -e $(yarn --silent paths tsconfig.json tsconfig.module.json))

echo "Compiling TypeScripts for the following projects:"
node -pe "'$tsconfig_paths'.split(' ').reduce((prev, next) => prev + '\n - ' + next, '')"
echo " Compiling TypeScripts for the following projects:"
node -pe "'$tsconfig_paths'.split(' ').reduce((prev, next) => prev + '\n - ' + next, '')"
echo

tsc -b $tsconfig_paths
Expand All @@ -19,9 +20,6 @@ echo
boxen --border-color cyan --dim-border --padding 1 "Building CDN bundles..."
echo

echo "You can safely ignore \`The 'this' keyword is equivalent to 'undefined'\` warnings"
echo

yarn wsrun --serial $INIT_CWD/scripts/wsrun/build:cdn.sh

# ---------------------------------------------------------------------------- #
Expand Down
8 changes: 5 additions & 3 deletions scripts/dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ echo
boxen --border-color cyan --dim-border --padding 1 "Building for development..."
echo

echo "🤔 Determining TypeScript projects to build..."
pkg_paths=$(echo -e $(yarn --silent paths))
tsconfig_paths=$(echo -e $(yarn --silent paths tsconfig.json tsconfig.module.json))

echo "Compiling TypeScripts for the following projects:"
node -pe "'$tsconfig_paths'.split(' ').reduce((prev, next) => prev + '\n - ' + next, '')"

echo " Compiling TypeScripts for the following projects:"
node -pe "'$tsconfig_paths'.split(' ').reduce((prev, next) => prev + '\n - ' + next, '')"
echo

sleep 3
sleep 5

tsc-watch --onSuccess "$INIT_CWD/scripts/inject-env.ts $pkg_paths" -b -w $tsconfig_paths
1 change: 1 addition & 0 deletions tsconfig.settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
"declaration": true,
"skipLibCheck": true,
"composite": true,
"importHelpers": true,
},
}
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13909,6 +13909,11 @@ tslib@^2.0.0:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.0.tgz#18d13fc2dce04051e20f074cc8387fd8089ce4f3"
integrity sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==

tslib@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.3.tgz#8e0741ac45fc0c226e58a17bfc3e64b9bc6ca61c"
integrity sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==

tsutils@^3.17.1:
version "3.17.1"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759"
Expand Down