Skip to content

Commit

Permalink
fix(esm): patch import statements in tsc output
Browse files Browse the repository at this point in the history
  • Loading branch information
irudoy committed Apr 16, 2022
1 parent 00f4956 commit 067a032
Show file tree
Hide file tree
Showing 2 changed files with 113 additions and 7 deletions.
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
"bugs": "https://github.com/dromru/react-photoswipe-gallery/issues",
"license": "MIT",
"scripts": {
"build": "rimraf dist && tsc --project tsconfig.json",
"start": "yarn build --watch",
"build-ts": "rimraf dist && tsc --project tsconfig.json",
"patch-import": "babel dist --out-dir dist --no-babelrc --plugins=babel-plugin-add-import-extension",
"build": "yarn build-ts && yarn patch-import",
"start": "yarn build-ts --watch",
"test": "jest",
"prepublish": "yarn build",
"lint": "eslint",
Expand All @@ -40,6 +42,7 @@
"postpack": "pinst --enable"
},
"devDependencies": {
"@babel/cli": "7.17.6",
"@babel/core": "7.17.9",
"@commitlint/cli": "16.2.3",
"@commitlint/config-conventional": "16.2.1",
Expand Down Expand Up @@ -69,6 +72,7 @@
"@typescript-eslint/parser": "5.19.0",
"@yarnpkg/sdks": "2.6.0",
"babel-loader": "8.2.4",
"babel-plugin-add-import-extension": "1.6.0",
"babel-plugin-named-exports-order": "0.0.2",
"commitizen": "4.2.4",
"core-js": "3.21.1",
Expand Down
112 changes: 107 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,34 @@ __metadata:
languageName: node
linkType: hard

"@babel/cli@npm:7.17.6":
version: 7.17.6
resolution: "@babel/cli@npm:7.17.6"
dependencies:
"@jridgewell/trace-mapping": ^0.3.4
"@nicolo-ribaudo/chokidar-2": 2.1.8-no-fsevents.3
chokidar: ^3.4.0
commander: ^4.0.1
convert-source-map: ^1.1.0
fs-readdir-recursive: ^1.1.0
glob: ^7.0.0
make-dir: ^2.1.0
slash: ^2.0.0
source-map: ^0.5.0
peerDependencies:
"@babel/core": ^7.0.0-0
dependenciesMeta:
"@nicolo-ribaudo/chokidar-2":
optional: true
chokidar:
optional: true
bin:
babel: ./bin/babel.js
babel-external-helpers: ./bin/babel-external-helpers.js
checksum: 362c9baf14e3984bad2388647941e0ce3bf1894a5f25cd8595ca0b9bdcd8b94eb06d15eef6590e2215cfc5a191e186ae65c0c6214ed4a3eec226bd0eacc37c44
languageName: node
linkType: hard

"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.11, @babel/code-frame@npm:^7.5.5":
version: 7.12.11
resolution: "@babel/code-frame@npm:7.12.11"
Expand Down Expand Up @@ -3463,7 +3491,7 @@ __metadata:
languageName: node
linkType: hard

"@jridgewell/trace-mapping@npm:^0.3.0":
"@jridgewell/trace-mapping@npm:^0.3.0, @jridgewell/trace-mapping@npm:^0.3.4":
version: 0.3.4
resolution: "@jridgewell/trace-mapping@npm:0.3.4"
dependencies:
Expand Down Expand Up @@ -3526,6 +3554,13 @@ __metadata:
languageName: node
linkType: hard

"@nicolo-ribaudo/chokidar-2@npm:2.1.8-no-fsevents.3":
version: 2.1.8-no-fsevents.3
resolution: "@nicolo-ribaudo/chokidar-2@npm:2.1.8-no-fsevents.3"
checksum: ee55cc9241aeea7eb94b8a8551bfa4246c56c53bc71ecda0a2104018fcc328ba5723b33686bdf9cc65d4df4ae65e8016b89e0bbdeb94e0309fe91bb9ced42344
languageName: node
linkType: hard

"@nodelib/fs.scandir@npm:2.1.4":
version: 2.1.4
resolution: "@nodelib/fs.scandir@npm:2.1.4"
Expand Down Expand Up @@ -6280,6 +6315,16 @@ __metadata:
languageName: node
linkType: hard

"anymatch@npm:~3.1.2":
version: 3.1.2
resolution: "anymatch@npm:3.1.2"
dependencies:
normalize-path: ^3.0.0
picomatch: ^2.0.4
checksum: 985163db2292fac9e5a1e072bf99f1b5baccf196e4de25a0b0b81865ebddeb3b3eb4480734ef0a2ac8c002845396b91aa89121f5b84f93981a4658164a9ec6e9
languageName: node
linkType: hard

"app-root-dir@npm:^1.0.2":
version: 1.0.2
resolution: "app-root-dir@npm:1.0.2"
Expand Down Expand Up @@ -6720,6 +6765,17 @@ __metadata:
languageName: node
linkType: hard

"babel-plugin-add-import-extension@npm:1.6.0":
version: 1.6.0
resolution: "babel-plugin-add-import-extension@npm:1.6.0"
dependencies:
"@babel/helper-plugin-utils": ^7.14.5
peerDependencies:
"@babel/core": ">=7.0.0"
checksum: 63723b2db364e621228de433ab38abf4df5f9ef148c46760ad5db447a82171d2f1fcd48e681f9fc03f502e81029fd0ff5b7fb7c2bbf37d4bb1361e919e5b836e
languageName: node
linkType: hard

"babel-plugin-add-react-displayname@npm:^0.0.5":
version: 0.0.5
resolution: "babel-plugin-add-react-displayname@npm:0.0.5"
Expand Down Expand Up @@ -7446,6 +7502,25 @@ __metadata:
languageName: node
linkType: hard

"chokidar@npm:^3.4.0":
version: 3.5.3
resolution: "chokidar@npm:3.5.3"
dependencies:
anymatch: ~3.1.2
braces: ~3.0.2
fsevents: ~2.3.2
glob-parent: ~5.1.2
is-binary-path: ~2.1.0
is-glob: ~4.0.1
normalize-path: ~3.0.0
readdirp: ~3.6.0
dependenciesMeta:
fsevents:
optional: true
checksum: b49fcde40176ba007ff361b198a2d35df60d9bb2a5aab228279eb810feae9294a6b4649ab15981304447afe1e6ffbf4788ad5db77235dc770ab777c6e771980c
languageName: node
linkType: hard

"chokidar@npm:^3.4.2":
version: 3.5.1
resolution: "chokidar@npm:3.5.1"
Expand Down Expand Up @@ -7756,7 +7831,7 @@ __metadata:
languageName: node
linkType: hard

"commander@npm:^4.1.1":
"commander@npm:^4.0.1, commander@npm:^4.1.1":
version: 4.1.1
resolution: "commander@npm:4.1.1"
checksum: d7b9913ff92cae20cb577a4ac6fcc121bd6223319e54a40f51a14740a681ad5c574fd29a57da478a5f234a6fa6c52cbf0b7c641353e03c648b1ae85ba670b977
Expand Down Expand Up @@ -8185,6 +8260,15 @@ __metadata:
languageName: node
linkType: hard

"convert-source-map@npm:^1.1.0":
version: 1.8.0
resolution: "convert-source-map@npm:1.8.0"
dependencies:
safe-buffer: ~5.1.1
checksum: 985d974a2d33e1a2543ada51c93e1ba2f73eaed608dc39f229afc78f71dcc4c8b7d7c684aa647e3c6a3a204027444d69e53e169ce94e8d1fa8d7dee80c9c8fed
languageName: node
linkType: hard

"convert-source-map@npm:^1.4.0, convert-source-map@npm:^1.6.0, convert-source-map@npm:^1.7.0":
version: 1.7.0
resolution: "convert-source-map@npm:1.7.0"
Expand Down Expand Up @@ -10483,14 +10567,21 @@ __metadata:
languageName: node
linkType: hard

"fs-readdir-recursive@npm:^1.1.0":
version: 1.1.0
resolution: "fs-readdir-recursive@npm:1.1.0"
checksum: 29d50f3d2128391c7fc9fd051c8b7ea45bcc8aa84daf31ef52b17218e20bfd2bd34d02382742801954cc8d1905832b68227f6b680a666ce525d8b6b75068ad1e
languageName: node
linkType: hard

"fs.realpath@npm:^1.0.0":
version: 1.0.0
resolution: "fs.realpath@npm:1.0.0"
checksum: 99ddea01a7e75aa276c250a04eedeffe5662bce66c65c07164ad6264f9de18fb21be9433ead460e54cff20e31721c811f4fb5d70591799df5f85dce6d6746fd0
languageName: node
linkType: hard

"fsevents@^2.3.2, fsevents@npm:^2.1.2, fsevents@~2.3.1":
"fsevents@^2.3.2, fsevents@npm:^2.1.2, fsevents@npm:~2.3.2, fsevents@~2.3.1":
version: 2.3.2
resolution: "fsevents@npm:2.3.2"
dependencies:
Expand All @@ -10500,7 +10591,7 @@ __metadata:
languageName: node
linkType: hard

"fsevents@patch:fsevents@^2.1.2#~builtin<compat/fsevents>, fsevents@patch:fsevents@^2.3.2#~builtin<compat/fsevents>, fsevents@patch:fsevents@~2.3.1#~builtin<compat/fsevents>":
"fsevents@patch:fsevents@^2.1.2#~builtin<compat/fsevents>, fsevents@patch:fsevents@^2.3.2#~builtin<compat/fsevents>, fsevents@patch:fsevents@~2.3.1#~builtin<compat/fsevents>, fsevents@patch:fsevents@~2.3.2#~builtin<compat/fsevents>":
version: 2.3.2
resolution: "fsevents@patch:fsevents@npm%3A2.3.2#~builtin<compat/fsevents>::version=2.3.2&hash=18f3a7"
dependencies:
Expand Down Expand Up @@ -10763,7 +10854,7 @@ __metadata:
languageName: node
linkType: hard

"glob-parent@npm:^5.1.2":
"glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.2":
version: 5.1.2
resolution: "glob-parent@npm:5.1.2"
dependencies:
Expand Down Expand Up @@ -16154,6 +16245,7 @@ photoswipe-dynamic-caption-plugin@dimsemenov/photoswipe-dynamic-caption-plugin:
version: 0.0.0-use.local
resolution: "react-photoswipe-gallery@workspace:."
dependencies:
"@babel/cli": 7.17.6
"@babel/core": 7.17.9
"@commitlint/cli": 16.2.3
"@commitlint/config-conventional": 16.2.1
Expand Down Expand Up @@ -16183,6 +16275,7 @@ photoswipe-dynamic-caption-plugin@dimsemenov/photoswipe-dynamic-caption-plugin:
"@typescript-eslint/parser": 5.19.0
"@yarnpkg/sdks": 2.6.0
babel-loader: 8.2.4
babel-plugin-add-import-extension: 1.6.0
babel-plugin-named-exports-order: 0.0.2
commitizen: 4.2.4
core-js: 3.21.1
Expand Down Expand Up @@ -16351,6 +16444,15 @@ photoswipe-dynamic-caption-plugin@dimsemenov/photoswipe-dynamic-caption-plugin:
languageName: node
linkType: hard

"readdirp@npm:~3.6.0":
version: 3.6.0
resolution: "readdirp@npm:3.6.0"
dependencies:
picomatch: ^2.2.1
checksum: 1ced032e6e45670b6d7352d71d21ce7edf7b9b928494dcaba6f11fba63180d9da6cd7061ebc34175ffda6ff529f481818c962952004d273178acd70f7059b320
languageName: node
linkType: hard

"rechoir@npm:^0.6.2":
version: 0.6.2
resolution: "rechoir@npm:0.6.2"
Expand Down

0 comments on commit 067a032

Please sign in to comment.