diff --git a/.changeset/upgrade-import-in-the-middle.md b/.changeset/upgrade-import-in-the-middle.md new file mode 100644 index 00000000000..0194fe054a0 --- /dev/null +++ b/.changeset/upgrade-import-in-the-middle.md @@ -0,0 +1,7 @@ +--- +"trigger.dev": patch +--- + +Upgrade import-in-the-middle from 1.11.0 to 3.0.0 to fix the `importAssertions` deprecation warning on Node.js v21+, v20.10.0+, and v18.19.0+. + +This resolves the error: `Use importAttributes instead of importAssertions` that occurred when using certain OpenTelemetry instrumentations like `UndiciInstrumentation`, `HttpInstrumentation`, and `AwsInstrumentation`. diff --git a/packages/cli-v3/e2e/fixtures.ts b/packages/cli-v3/e2e/fixtures.ts index 95011a36f8d..ed73b08f57a 100644 --- a/packages/cli-v3/e2e/fixtures.ts +++ b/packages/cli-v3/e2e/fixtures.ts @@ -49,7 +49,7 @@ export const fixturesConfig: TestCase[] = [ externals: [ { name: "import-in-the-middle", - version: "1.11.0", + version: "3.0.0", }, ], files: [{ entry: "src/trigger/helloWorld.ts" }], @@ -82,7 +82,7 @@ export const fixturesConfig: TestCase[] = [ }, { name: "import-in-the-middle", - version: "1.11.0", + version: "3.0.0", }, ], files: [{ entry: "src/trigger/ai.ts" }], @@ -114,7 +114,7 @@ export const fixturesConfig: TestCase[] = [ externals: [ { name: "import-in-the-middle", - version: "1.11.0", + version: "3.0.0", }, ], files: [{ entry: "src/trigger/decorators.ts" }], @@ -145,7 +145,7 @@ export const fixturesConfig: TestCase[] = [ externals: [ { name: "import-in-the-middle", - version: "1.11.0", + version: "3.0.0", }, ], files: [{ entry: "src/reactEmail.tsx" }], @@ -178,7 +178,7 @@ export const fixturesConfig: TestCase[] = [ externals: [ { name: "import-in-the-middle", - version: "1.11.0", + version: "3.0.0", }, { name: "mupdf", diff --git a/packages/cli-v3/package.json b/packages/cli-v3/package.json index e5de14b9f77..40b2cd8fb5a 100644 --- a/packages/cli-v3/package.json +++ b/packages/cli-v3/package.json @@ -114,7 +114,7 @@ "gradient-string": "^2.0.2", "has-flag": "^5.0.1", "ignore": "^7.0.5", - "import-in-the-middle": "1.11.0", + "import-in-the-middle": "3.0.0", "import-meta-resolve": "^4.1.0", "ini": "^5.0.0", "json-stable-stringify": "^1.3.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 83e28308337..2fe1f220c56 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1521,8 +1521,8 @@ importers: specifier: ^7.0.5 version: 7.0.5 import-in-the-middle: - specifier: 1.11.0 - version: 1.11.0 + specifier: 3.0.0 + version: 3.0.0 import-meta-resolve: specifier: ^4.1.0 version: 4.1.0 @@ -11152,7 +11152,7 @@ packages: '@vercel/postgres@0.10.0': resolution: {integrity: sha512-fSD23DxGND40IzSkXjcFcxr53t3Tiym59Is0jSYIFpG4/0f0KO9SGtcp1sXiebvPaGe7N/tU05cH4yt2S6/IPg==} engines: {node: '>=18.14'} - deprecated: '@vercel/postgres is deprecated. You can either choose an alternate storage solution from the Vercel Marketplace if you want to set up a new database. Or you can follow this guide to migrate your existing Vercel Postgres db: https://neon.com/docs/guides/vercel-postgres-transition-guide' + deprecated: '@vercel/postgres is deprecated. If you are setting up a new database, you can choose an alternate storage solution from the Vercel Marketplace. If you had an existing Vercel Postgres database, it should have been migrated to Neon as a native Vercel integration. You can find more details and the guide to migrate to Neon''s SDKs here: https://neon.com/docs/guides/vercel-postgres-transition-guide' '@vercel/sdk@1.19.1': resolution: {integrity: sha512-K4rmtUT6t1vX06tiY44ot8A7W1FKN7g/tMkE7yZghCgNQ8b30SzljBd4ni8RNp2pJzM/HrZmphRDeIArO7oZuw==} @@ -11808,6 +11808,7 @@ packages: basic-ftp@5.0.3: resolution: {integrity: sha512-QHX8HLlncOLpy54mh+k/sWIFd0ThmRqwe9ZjELybGZK+tZ8rUb9VO0saKJUROTbE+KhzDUT7xziGpGrW8Kmd+g==} engines: {node: '>=10.0.0'} + deprecated: Security vulnerability fixed in 5.2.0, please upgrade bcrypt-pbkdf@1.0.2: resolution: {integrity: sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==} @@ -12144,6 +12145,9 @@ packages: cjs-module-lexer@1.2.3: resolution: {integrity: sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==} + cjs-module-lexer@2.2.0: + resolution: {integrity: sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==} + class-variance-authority@0.5.2: resolution: {integrity: sha512-j7Qqw3NPbs4IpO80gvdACWmVvHiLLo5MECacUBLnJG17CrLpWaQ7/4OaWX6P0IO1j2nvZ7AuSfBS/ImtEUZJGA==} peerDependencies: @@ -14244,29 +14248,34 @@ packages: glob@10.3.10: resolution: {integrity: sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==} engines: {node: '>=16 || 14 >=14.17'} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me hasBin: true glob@10.3.4: resolution: {integrity: sha512-6LFElP3A+i/Q8XQKEvZjkEWEOTgAIALR9AO2rwT8bgPhDd1anmqDJDZ6lLddI4ehxxxR1S5RIqKe1uapMQfYaQ==} engines: {node: '>=16 || 14 >=14.17'} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me hasBin: true glob@10.4.5: resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me hasBin: true glob@11.0.0: resolution: {integrity: sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==} engines: {node: 20 || >=22} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me hasBin: true glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - deprecated: Glob versions prior to v9 are no longer supported + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me glob@9.3.5: resolution: {integrity: sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==} engines: {node: '>=16 || 14 >=14.17'} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me globals@11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} @@ -14575,6 +14584,10 @@ packages: import-in-the-middle@1.14.2: resolution: {integrity: sha512-5tCuY9BV8ujfOpwtAGgsTx9CGUapcFMEEyByLv1B+v2+6DhAcw+Zr0nhQT7uwaZ7DiourxFEscghOR8e1aPLQw==} + import-in-the-middle@3.0.0: + resolution: {integrity: sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==} + engines: {node: '>=18'} + import-meta-resolve@4.1.0: resolution: {integrity: sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==} @@ -16115,6 +16128,9 @@ packages: module-details-from-path@1.0.3: resolution: {integrity: sha512-ySViT69/76t8VhE1xXHK6Ch4NcDd26gx0MzKXLO+F7NOtnqH68d9zF94nT8ZWSxXh8ELOERsnJO/sWt1xZYw5A==} + module-details-from-path@1.0.4: + resolution: {integrity: sha512-EGWKgxALGMgzvxYF1UyGTy0HXX/2vHLkw6+NvDKW2jypWbHpjQuj4UMcqQWXHERJhVGKikolT06G3bcKe4fi7w==} + moo@0.5.2: resolution: {integrity: sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==} @@ -17291,6 +17307,7 @@ packages: prebuild-install@7.1.3: resolution: {integrity: sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==} engines: {node: '>=10'} + deprecated: No longer maintained. Please contact the author of the relevant native addon; alternatives are available. hasBin: true preferred-pm@3.0.3: @@ -23155,7 +23172,7 @@ snapshots: '@epic-web/test-server@0.1.0(bufferutil@4.0.9)': dependencies: '@hono/node-server': 1.12.2(hono@4.5.11) - '@hono/node-ws': 1.0.4(@hono/node-server@1.12.2(hono@4.5.11))(bufferutil@4.0.9) + '@hono/node-ws': 1.0.4(@hono/node-server@1.12.2(hono@4.11.8))(bufferutil@4.0.9) '@open-draft/deferred-promise': 2.2.0 '@types/ws': 8.5.12 hono: 4.5.11 @@ -23910,7 +23927,7 @@ snapshots: dependencies: hono: 4.11.8 - '@hono/node-ws@1.0.4(@hono/node-server@1.12.2(hono@4.5.11))(bufferutil@4.0.9)': + '@hono/node-ws@1.0.4(@hono/node-server@1.12.2(hono@4.11.8))(bufferutil@4.0.9)': dependencies: '@hono/node-server': 1.12.2(hono@4.5.11) ws: 8.18.3(bufferutil@4.0.9) @@ -25220,7 +25237,7 @@ snapshots: '@opentelemetry/api': 1.9.0 '@opentelemetry/api-logs': 0.52.1 '@types/shimmer': 1.2.0 - import-in-the-middle: 1.11.0 + import-in-the-middle: 1.14.2 require-in-the-middle: 7.1.1(supports-color@10.0.0) semver: 7.7.3 shimmer: 1.2.1 @@ -25232,7 +25249,7 @@ snapshots: '@opentelemetry/api': 1.9.0 '@opentelemetry/api-logs': 0.57.2 '@types/shimmer': 1.2.0 - import-in-the-middle: 1.11.0 + import-in-the-middle: 1.14.2 require-in-the-middle: 7.1.1(supports-color@10.0.0) semver: 7.7.3 shimmer: 1.2.1 @@ -32710,6 +32727,8 @@ snapshots: cjs-module-lexer@1.2.3: {} + cjs-module-lexer@2.2.0: {} + class-variance-authority@0.5.2(typescript@5.5.4): optionalDependencies: typescript: 5.5.4 @@ -35696,6 +35715,13 @@ snapshots: cjs-module-lexer: 1.2.3 module-details-from-path: 1.0.3 + import-in-the-middle@3.0.0: + dependencies: + acorn: 8.15.0 + acorn-import-attributes: 1.9.5(acorn@8.15.0) + cjs-module-lexer: 2.2.0 + module-details-from-path: 1.0.4 + import-meta-resolve@4.1.0: {} imurmurhash@0.1.4: {} @@ -37513,6 +37539,8 @@ snapshots: module-details-from-path@1.0.3: {} + module-details-from-path@1.0.4: {} + moo@0.5.2: {} morgan@1.10.0: