From 40eb62e7e798511d6fc1b3bd64e1f4c8a00c6b94 Mon Sep 17 00:00:00 2001 From: JounQin Date: Sat, 25 Jun 2022 18:07:36 +0800 Subject: [PATCH 1/3] ci: add pkg-size action (#112) --- .github/workflows/pkg-size.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/pkg-size.yml diff --git a/.github/workflows/pkg-size.yml b/.github/workflows/pkg-size.yml new file mode 100644 index 00000000..3938ef47 --- /dev/null +++ b/.github/workflows/pkg-size.yml @@ -0,0 +1,26 @@ +name: Package Size Report + +on: + pull_request: + branches: + - main + +jobs: + pkg-size-report: + name: Package Size Report + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 16.x + cache: yarn + + - name: Package Size Report + uses: pkg-size/action@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From c74fe0e99d219e4a28348e833fc605664f02be18 Mon Sep 17 00:00:00 2001 From: JounQin Date: Mon, 27 Jun 2022 18:21:32 +0800 Subject: [PATCH 2/3] fix: add conditionNames support (#114) --- src/index.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/index.ts b/src/index.ts index af837e15..ff85772d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -55,6 +55,16 @@ const defaultMainFields = [ 'main', ] +const defaultConditionNames = [ + 'types', + 'import', + 'require', + 'node', + 'node-addons', + 'browser', + 'default', +] + export const interfaceVersion = 2 export interface TsResolverOptions @@ -63,6 +73,7 @@ export interface TsResolverOptions project?: string[] | string extensions?: string[] packageFilter?: (pkg: Record) => Record + conditionNamesMapper?: Record } const fileSystem = fs as FileSystem @@ -88,6 +99,7 @@ export function resolve( ...options, extensions: options?.extensions ?? defaultExtensions, mainFields: options?.mainFields ?? defaultMainFields, + conditionNames: options?.conditionNames ?? defaultConditionNames, fileSystem, useSyncFileSystemCalls: true, } From e96dcc18fc28b2833f33096be90e1dbac3105c46 Mon Sep 17 00:00:00 2001 From: JounQin Date: Mon, 27 Jun 2022 18:22:26 +0800 Subject: [PATCH 3/3] chore(release): 3.1.1 --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6df8d457..35edfefa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [3.1.1](https://github.com/alexgorbatchev/eslint-import-resolver-typescript/compare/v3.1.0...v3.1.1) (2022-06-27) + + +### Bug Fixes + +* add conditionNames support ([#114](https://github.com/alexgorbatchev/eslint-import-resolver-typescript/issues/114)) ([c74fe0e](https://github.com/alexgorbatchev/eslint-import-resolver-typescript/commit/c74fe0e99d219e4a28348e833fc605664f02be18)) + ## [3.1.0](https://github.com/alexgorbatchev/eslint-import-resolver-typescript/compare/v3.0.0...v3.1.0) (2022-06-25) diff --git a/package.json b/package.json index 1ec5dbf7..16306c90 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-import-resolver-typescript", - "version": "3.1.0", + "version": "3.1.1", "type": "module", "description": "TypeScript .ts .tsx module resolver for `eslint-plugin-import`.", "repository": "https://github.com/alexgorbatchev/eslint-import-resolver-typescript",