From 1acb5ca12bd57d7ed2b16604eade93d585b2a08d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=ADcholas=20Andr=C3=A9?= Date: Tue, 24 Oct 2023 10:01:18 -0300 Subject: [PATCH] fix: try with tsc-esm-fix --- package-lock.json | 123 +++++++++++++++++++++++++++++++------ packages/core/package.json | 4 +- packages/next/package.json | 4 +- 3 files changed, 109 insertions(+), 22 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9f6f85b5a..90d5a5564 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10725,9 +10725,10 @@ "peer": true }, "node_modules/fast-glob": { - "version": "3.2.12", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", "dev": true, - "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -11021,18 +11022,6 @@ "node": ">= 10.13.0" } }, - "node_modules/fix-esm-import-path": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/fix-esm-import-path/-/fix-esm-import-path-1.4.0.tgz", - "integrity": "sha512-xTkmzlotSgZwn3mNOZA6R6IK0Ow1uQvtdeGS8hqRa1nl8rwdtxZPWktorKcwvsUDpCPnqFbkfsya9P3MG6rTcg==", - "dev": true, - "dependencies": { - "debug": "^4.3.2" - }, - "bin": { - "fix-esm-import-path": "fix-esm-import-path.js" - } - }, "node_modules/flagged-respawn": { "version": "2.0.0", "dev": true, @@ -20390,6 +20379,103 @@ "source-map": "^0.6.0" } }, + "node_modules/tsc-esm-fix": { + "version": "2.20.17", + "resolved": "https://registry.npmjs.org/tsc-esm-fix/-/tsc-esm-fix-2.20.17.tgz", + "integrity": "sha512-TC/JVuSb8G0pAVtMmDIaB3sK6vfMUIIGPQAg82CPRStDPryZwXpppW9tJn/Z5Kr8vgxNiRtIOIgxtGY9D/WNBA==", + "dev": true, + "dependencies": { + "fs-extra": "^11.1.1", + "globby": "^13.2.2", + "json5": "^2.2.3", + "meow": "^12.1.1", + "tslib": "^2.6.2" + }, + "bin": { + "tsc-esm-fix": "target/es6/cli.mjs" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/tsc-esm-fix/node_modules/fs-extra": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", + "integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/tsc-esm-fix/node_modules/globby": { + "version": "13.2.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz", + "integrity": "sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==", + "dev": true, + "dependencies": { + "dir-glob": "^3.0.1", + "fast-glob": "^3.3.0", + "ignore": "^5.2.4", + "merge2": "^1.4.1", + "slash": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tsc-esm-fix/node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/tsc-esm-fix/node_modules/meow": { + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-12.1.1.tgz", + "integrity": "sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==", + "dev": true, + "engines": { + "node": ">=16.10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tsc-esm-fix/node_modules/slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tsc-esm-fix/node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/tsconfig-paths": { "version": "3.14.2", "dev": true, @@ -20421,8 +20507,9 @@ } }, "node_modules/tslib": { - "version": "2.5.0", - "license": "0BSD" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/tsutils": { "version": "3.21.0", @@ -22031,10 +22118,10 @@ "@types/jest": "^29.0.3", "@types/node-fetch": "^2.5.3", "expect-type": "^0.15.0", - "fix-esm-import-path": "^1.4.0", "jest": "^29.3.1", "msw": "^0.35.0", "ts-jest": "^29.0.3", + "tsc-esm-fix": "^2.20.17", "typescript": "^5.0.4", "whatwg-fetch": "^3.6.2" }, @@ -22424,11 +22511,11 @@ "@types/jest": "^29.0.3", "copy-webpack-plugin": "^10.2.4", "expect-type": "^0.15.0", - "fix-esm-import-path": "^1.4.0", "jest": "^29.0.3", "next-router-mock": "^0.9.1", "node-mocks-http": "^1.11.0", "ts-jest": "^29.0.1", + "tsc-esm-fix": "^2.20.17", "typescript": "^5.0.4", "whatwg-fetch": "^3.6.2" }, diff --git a/packages/core/package.json b/packages/core/package.json index 422546948..2ff12da22 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -41,7 +41,7 @@ "sideEffects": false, "scripts": { "build": "npm run ts && npm run ts:cjs", - "postbuild": "fix-esm-import-path dist/mjs && node ../../scripts/package.js", + "postbuild": "tsc-esm-fix --target dist/mjs && node ../../scripts/package.js", "ts:cjs": "tsc -b tsconfig-cjs.json", "ts": "tsc -b", "dev": "concurrently \"npm run watch:ts:cjs\" \"npm run watch:ts\"", @@ -61,7 +61,7 @@ "ts-jest": "^29.0.3", "typescript": "^5.0.4", "whatwg-fetch": "^3.6.2", - "fix-esm-import-path": "^1.4.0" + "tsc-esm-fix": "^2.20.17" }, "dependencies": { "@justinribeiro/lite-youtube": "^1.3.1", diff --git a/packages/next/package.json b/packages/next/package.json index 3ff1df9c1..dabfa0f7a 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -39,7 +39,7 @@ "sideEffects": false, "scripts": { "build": "npm run ts && npm run ts:cjs", - "postbuild": "fix-esm-import-path dist/mjs && node ../../scripts/package.js", + "postbuild": "tsc-esm-fix && node ../../scripts/package.js", "ts:cjs": "tsc -b tsconfig-cjs.json", "ts": "tsc -b", "dev": "concurrently \"npm run watch:ts:cjs\" \"npm run watch:ts\"", @@ -67,7 +67,7 @@ "ts-jest": "^29.0.1", "typescript": "^5.0.4", "whatwg-fetch": "^3.6.2", - "fix-esm-import-path": "^1.4.0" + "tsc-esm-fix": "^2.20.17" }, "peerDependencies": { "next": ">= 12.0.0",