Skip to content

Commit 9b03c98

Browse files
stepankuzmingithub-actions[bot]
authored andcommitted
Run typing test in isolation to catch undeclared .d.ts imports
GitOrigin-RevId: 7c9abd41e8e33073c6a7342036868dd338f52f13
1 parent 7427b76 commit 9b03c98

1 file changed

Lines changed: 20 additions & 2 deletions

File tree

test/build/typings/pretest.sh

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
#!/bin/bash
22
set -e
33

4-
../pack.sh
4+
DEST="$(cd "$(dirname "$0")" && pwd)"
5+
TARBALL_DIR="$DEST/.."
6+
7+
"$TARBALL_DIR/pack.sh"
8+
9+
ISO_DIR="$(mktemp -d)"
10+
trap "rm -rf '$ISO_DIR'" EXIT
11+
12+
cp "$DEST"/package.json \
13+
"$DEST"/tsconfig.json \
14+
"$DEST"/tsconfig.strict.json \
15+
"$DEST"/*.ts \
16+
"$ISO_DIR/"
17+
18+
cd "$ISO_DIR"
19+
npm install --no-save "$TARBALL_DIR/mapbox-gl.tgz"
20+
npm run tsc:strict
21+
22+
cd "$DEST"
523
rm -rf node_modules/mapbox-gl node_modules/@mapbox/mapbox-gl-style-spec
6-
npm install --no-save ../mapbox-gl.tgz ../mapbox-gl-style-spec.tgz
24+
npm install --no-save "$TARBALL_DIR/mapbox-gl.tgz" "$TARBALL_DIR/mapbox-gl-style-spec.tgz"

0 commit comments

Comments
 (0)