Skip to content

Commit 762ffbf

Browse files
committed
Adds tsc-alias to resolve absolute paths in ts build declarations
1 parent 724742d commit 762ffbf

File tree

3 files changed

+87
-8
lines changed

3 files changed

+87
-8
lines changed

.changeset/late-nails-matter.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@shopify/draggable': patch
3+
---
4+
5+
- Cleans up code comments from build folder
6+
- Also resolves absolute paths for ts build declarations
7+
- Renames build files with .cjs and .mjs

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,14 @@
3737
"esdoc": "esdoc -c esdoc.json",
3838
"test": "jest",
3939
"build:development": "yarn rollup --config rollup.development.config.ts --configPlugin @rollup/plugin-typescript",
40-
"build:production": "tsc && yarn rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript && yarn uglifyjs --compress --mangle -- build/umd/index.js -o build/umd/index.min.js",
40+
"build:production": "tsc && tsc-alias && yarn rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript && yarn uglifyjs --compress --mangle -- build/umd/index.js -o build/umd/index.min.js",
4141
"verify": "yarn lint && yarn type-check && yarn build && yarn test"
4242
},
4343
"files": [
4444
"build/**/*",
45+
"!build/ts/**/*.tsbuildinfo",
46+
"!build/ts/**/tests/",
47+
"!build/ts/**/test/",
4548
"index.d.ts"
4649
],
4750
"devDependencies": {
@@ -72,6 +75,7 @@
7275
"rollup-plugin-includepaths": "^0.2.4",
7376
"rollup-plugin-node-externals": "^6.1.1",
7477
"timers": "^0.1.1",
78+
"tsc-alias": "^1.8.8",
7579
"typescript": "^5.2.2",
7680
"uglify-js": "^3.17.4"
7781
},

yarn.lock

Lines changed: 75 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2075,7 +2075,7 @@ ansi-styles@^5.0.0:
20752075
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b"
20762076
integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==
20772077

2078-
anymatch@^3.0.3:
2078+
anymatch@^3.0.3, anymatch@~3.1.2:
20792079
version "3.1.3"
20802080
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e"
20812081
integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==
@@ -2430,6 +2430,11 @@ big-integer@^1.6.44:
24302430
resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686"
24312431
integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==
24322432

2433+
binary-extensions@^2.0.0:
2434+
version "2.2.0"
2435+
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
2436+
integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==
2437+
24332438
boolbase@~1.0.0:
24342439
version "1.0.0"
24352440
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
@@ -2457,7 +2462,7 @@ brace-expansion@^2.0.1:
24572462
dependencies:
24582463
balanced-match "^1.0.0"
24592464

2460-
braces@^3.0.2:
2465+
braces@^3.0.2, braces@~3.0.2:
24612466
version "3.0.2"
24622467
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
24632468
integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
@@ -2667,6 +2672,21 @@ [email protected]:
26672672
lodash "^4.15.0"
26682673
parse5 "^3.0.1"
26692674

2675+
chokidar@^3.5.3:
2676+
version "3.5.3"
2677+
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd"
2678+
integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==
2679+
dependencies:
2680+
anymatch "~3.1.2"
2681+
braces "~3.0.2"
2682+
glob-parent "~5.1.2"
2683+
is-binary-path "~2.1.0"
2684+
is-glob "~4.0.1"
2685+
normalize-path "~3.0.0"
2686+
readdirp "~3.6.0"
2687+
optionalDependencies:
2688+
fsevents "~2.3.2"
2689+
26702690
ci-info@^3.1.0, ci-info@^3.2.0:
26712691
version "3.8.0"
26722692
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.8.0.tgz#81408265a5380c929f0bc665d62256628ce9ef91"
@@ -2756,6 +2776,11 @@ [email protected]:
27562776
resolved "https://registry.yarnpkg.com/commander/-/commander-2.6.0.tgz#9df7e52fb2a0cb0fb89058ee80c3104225f37e1d"
27572777
integrity sha512-PhbTMT+ilDXZKqH8xbvuUY2ZEQNef0Q7DKxgoEKb4ccytsdvVVJmYqR0sGbi96nxU6oGrwEIQnclpK2NBZuQlg==
27582778

2779+
commander@^9.0.0:
2780+
version "9.5.0"
2781+
resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30"
2782+
integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==
2783+
27592784
common-tags@^1.8.2:
27602785
version "1.8.2"
27612786
resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.2.tgz#94ebb3c076d26032745fd54face7f688ef5ac9c6"
@@ -4108,7 +4133,7 @@ getpass@^0.1.1:
41084133
dependencies:
41094134
assert-plus "^1.0.0"
41104135

4111-
glob-parent@^5.1.2:
4136+
glob-parent@^5.1.2, glob-parent@~5.1.2:
41124137
version "5.1.2"
41134138
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
41144139
integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
@@ -4169,7 +4194,7 @@ globalthis@^1.0.3:
41694194
dependencies:
41704195
define-properties "^1.1.3"
41714196

4172-
globby@^11.0.0, globby@^11.1.0:
4197+
globby@^11.0.0, globby@^11.0.4, globby@^11.1.0:
41734198
version "11.1.0"
41744199
resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b"
41754200
integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==
@@ -4478,6 +4503,13 @@ is-bigint@^1.0.1:
44784503
dependencies:
44794504
has-bigints "^1.0.1"
44804505

4506+
is-binary-path@~2.1.0:
4507+
version "2.1.0"
4508+
resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09"
4509+
integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==
4510+
dependencies:
4511+
binary-extensions "^2.0.0"
4512+
44814513
is-boolean-object@^1.1.0:
44824514
version "1.1.2"
44834515
resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719"
@@ -4563,7 +4595,7 @@ is-generator-function@^1.0.10:
45634595
dependencies:
45644596
has-tostringtag "^1.0.0"
45654597

4566-
is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3:
4598+
is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1:
45674599
version "4.0.3"
45684600
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
45694601
integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==
@@ -5735,6 +5767,11 @@ ms@^2.1.1:
57355767
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
57365768
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
57375769

5770+
mylas@^2.1.9:
5771+
version "2.1.13"
5772+
resolved "https://registry.yarnpkg.com/mylas/-/mylas-2.1.13.tgz#1e23b37d58fdcc76e15d8a5ed23f9ae9fc0cbdf4"
5773+
integrity sha512-+MrqnJRtxdF+xngFfUUkIMQrUUL0KsxbADUkn23Z/4ibGg192Q+z+CQyiYwvWTsYjJygmMR8+w3ZDa98Zh6ESg==
5774+
57385775
natural-compare@^1.4.0:
57395776
version "1.4.0"
57405777
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
@@ -5775,7 +5812,7 @@ normalize-package-data@^2.3.2, normalize-package-data@^2.5.0:
57755812
semver "2 || 3 || 4 || 5"
57765813
validate-npm-package-license "^3.0.1"
57775814

5778-
normalize-path@^3.0.0:
5815+
normalize-path@^3.0.0, normalize-path@~3.0.0:
57795816
version "3.0.0"
57805817
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
57815818
integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
@@ -6116,7 +6153,7 @@ picocolors@^1.0.0:
61166153
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
61176154
integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
61186155

6119-
picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1:
6156+
picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1:
61206157
version "2.3.1"
61216158
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
61226159
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
@@ -6150,6 +6187,13 @@ pkg-dir@^5.0.0:
61506187
dependencies:
61516188
find-up "^5.0.0"
61526189

6190+
plimit-lit@^1.2.6:
6191+
version "1.5.0"
6192+
resolved "https://registry.yarnpkg.com/plimit-lit/-/plimit-lit-1.5.0.tgz#f66df8a7041de1e965c4f1c0697ab486968a92a5"
6193+
integrity sha512-Eb/MqCb1Iv/ok4m1FqIXqvUKPISufcjZ605hl3KM/n8GaX8zfhtgdLwZU3vKjuHGh2O9Rjog/bHTq8ofIShdng==
6194+
dependencies:
6195+
queue-lit "^1.5.0"
6196+
61536197
pluralize@^8.0.0:
61546198
version "8.0.0"
61556199
resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1"
@@ -6248,6 +6292,11 @@ querystringify@^2.1.1:
62486292
resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6"
62496293
integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==
62506294

6295+
queue-lit@^1.5.0:
6296+
version "1.5.0"
6297+
resolved "https://registry.yarnpkg.com/queue-lit/-/queue-lit-1.5.0.tgz#8197fdafda1edd615c8a0fc14c48353626e5160a"
6298+
integrity sha512-IslToJ4eiCEE9xwMzq3viOO5nH8sUWUCwoElrhNMozzr9IIt2qqvB4I+uHu/zJTQVqc9R5DFwok4ijNK1pU3fA==
6299+
62516300
queue-microtask@^1.2.2:
62526301
version "1.2.3"
62536302
resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"
@@ -6325,6 +6374,13 @@ readable-stream@^3.1.1:
63256374
string_decoder "^1.1.1"
63266375
util-deprecate "^1.0.1"
63276376

6377+
readdirp@~3.6.0:
6378+
version "3.6.0"
6379+
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
6380+
integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==
6381+
dependencies:
6382+
picomatch "^2.2.1"
6383+
63286384
redent@^3.0.0:
63296385
version "3.0.0"
63306386
resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f"
@@ -7101,6 +7157,18 @@ ts-api-utils@^1.0.1:
71017157
resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.3.tgz#f12c1c781d04427313dbac808f453f050e54a331"
71027158
integrity sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==
71037159

7160+
tsc-alias@^1.8.8:
7161+
version "1.8.8"
7162+
resolved "https://registry.yarnpkg.com/tsc-alias/-/tsc-alias-1.8.8.tgz#48696af442b7656dd7905e37ae0bc332d80be3fe"
7163+
integrity sha512-OYUOd2wl0H858NvABWr/BoSKNERw3N9GTi3rHPK8Iv4O1UyUXIrTTOAZNHsjlVpXFOhpJBVARI1s+rzwLivN3Q==
7164+
dependencies:
7165+
chokidar "^3.5.3"
7166+
commander "^9.0.0"
7167+
globby "^11.0.4"
7168+
mylas "^2.1.9"
7169+
normalize-path "^3.0.0"
7170+
plimit-lit "^1.2.6"
7171+
71047172
tsconfig-paths@^3.14.2:
71057173
version "3.14.2"
71067174
resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088"

0 commit comments

Comments
 (0)