From aa417b78b3e92d16ccd2064e7aa89c8964c5b276 Mon Sep 17 00:00:00 2001 From: Mateusz Bocian Date: Fri, 3 May 2024 12:26:49 -0400 Subject: [PATCH 1/2] fix: path imports for typescript (#493) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🎉 Thanks for sending this pull request! 🎉 Please make sure the title is clear and descriptive. If you are fixing a typo or documentation, please skip these instructions. Otherwise please fill in the sections below. **Which problem is this pull request solving?** See https://github.com/netlify/functions/actions/runs/8939586357/job/24555907790 **Describe the solution you've chosen** Remove export block to support node 10 and allow internal to be imported **Describe alternatives you've considered** Linking `internal.ts` in `main.ts`, however we look to want to keep these seperate **Checklist** Please add a `x` inside each checkbox: - [x] I have read the [contribution guidelines](../blob/master/CONTRIBUTING.md). - [x] The status checks are successful (continuous integration). Those can be seen below. - [x] Passed `npm run test:publish` - [x] Tested change with `npm link @netlify/functions` --- internal.d.ts | 2 ++ package.json | 24 ++++++++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 internal.d.ts diff --git a/internal.d.ts b/internal.d.ts new file mode 100644 index 00000000..d91dddf5 --- /dev/null +++ b/internal.d.ts @@ -0,0 +1,2 @@ +// eslint-disable-next-line import/extensions +export * from './dist/internal.js' diff --git a/package.json b/package.json index f0d9b75e..248da4c6 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,27 @@ { "name": "@netlify/functions", "main": "./dist/main.js", - "types": "./dist/main.d.ts", "type": "commonjs", "exports": { ".": { - "import": "./dist/main.mjs", - "require": "./dist/main.js" + "require": { + "types": "./dist/main.d.ts", + "default": "./dist/main.js" + }, + "import": { + "types": "./dist/main.d.mts", + "default": "./dist/main.mjs" + } }, "./internal": { - "import": "./dist/internal.mjs", - "require": "./dist/internal.js" + "require": { + "types": "./dist/internal.d.ts", + "default": "./dist/internal.js" + }, + "import": { + "types": "./dist/internal.d.mts", + "default": "./dist/internal.mjs" + } } }, "version": "2.6.1", @@ -19,7 +30,8 @@ "dist/**/*.js", "dist/**/*.mjs", "dist/**/*.d.ts", - "dist/**/*.d.mts" + "dist/**/*.d.mts", + "internal.d.ts" ], "scripts": { "build": "tsup src --format esm,cjs --dts --clean", From 61dc1466f9432a75e90a39fa7dfbf32975e2a2ce Mon Sep 17 00:00:00 2001 From: "token-generator-app[bot]" <82042599+token-generator-app[bot]@users.noreply.github.com> Date: Fri, 3 May 2024 16:28:47 +0000 Subject: [PATCH 2/2] chore(main): release 2.6.2 (#494) :robot: I have created a release *beep* *boop* --- ## [2.6.2](https://github.com/netlify/functions/compare/v2.6.1...v2.6.2) (2024-05-03) ### Bug Fixes * path imports for typescript ([#493](https://github.com/netlify/functions/issues/493)) ([aa417b7](https://github.com/netlify/functions/commit/aa417b78b3e92d16ccd2064e7aa89c8964c5b276)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: token-generator-app[bot] <82042599+token-generator-app[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4017fdd2..ca29d99b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.6.2](https://github.com/netlify/functions/compare/v2.6.1...v2.6.2) (2024-05-03) + + +### Bug Fixes + +* path imports for typescript ([#493](https://github.com/netlify/functions/issues/493)) ([aa417b7](https://github.com/netlify/functions/commit/aa417b78b3e92d16ccd2064e7aa89c8964c5b276)) + ## [2.6.1](https://github.com/netlify/functions/compare/v2.6.0...v2.6.1) (2024-05-03) diff --git a/package-lock.json b/package-lock.json index 7f82d2c1..6a1463ed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@netlify/functions", - "version": "2.6.1", + "version": "2.6.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@netlify/functions", - "version": "2.6.1", + "version": "2.6.2", "license": "MIT", "dependencies": { "@netlify/serverless-functions-api": "1.18.0" diff --git a/package.json b/package.json index 248da4c6..a386f73b 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ } } }, - "version": "2.6.1", + "version": "2.6.2", "description": "JavaScript utilities for Netlify Functions", "files": [ "dist/**/*.js",