Skip to content

Commit 01f525e

Browse files
authoredJun 30, 2022
ci: integration with changesets (#118)
1 parent e96dcc1 commit 01f525e

File tree

10 files changed

+1437
-497
lines changed

10 files changed

+1437
-497
lines changed
 

‎.changeset/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

‎.changeset/config.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@1.6.0/schema.json",
3+
"changelog": [
4+
"@changesets/changelog-github",
5+
{
6+
"repo": "import-js/eslint-import-resolver-typescript"
7+
}
8+
],
9+
"commit": false,
10+
"linked": [],
11+
"access": "public",
12+
"baseBranch": "master",
13+
"updateInternalDependencies": "patch",
14+
"ignore": []
15+
}

‎.changeset/small-apes-walk.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-import-resolver-typescript": patch
3+
---
4+
5+
docs: update repository, document `exports` support

‎.codesandbox/ci.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"node": "16",
3+
"sandboxes": []
4+
}

‎.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
github: [alexgorbatchev, JounQin]
22
open_collective: rxts
3+
patreon: 1stG

‎.github/workflows/release.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repo
14+
uses: actions/checkout@v3
15+
with:
16+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
17+
fetch-depth: 0
18+
19+
- name: Setup Node.js 16.x
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: 16.x
23+
cache: yarn
24+
25+
- name: Install Dependencies
26+
run: yarn i --frozen-lockfile
27+
28+
- name: Create Release Pull Request or Publish to npm
29+
id: changesets
30+
uses: changesets/action@v1
31+
with:
32+
# This expects you to have a script called release which does a build for your packages and calls changeset publish
33+
publish: yarn release
34+
commit: 'chore: release eslint-import-resolver-typescript'
35+
title: 'chore: release eslint-import-resolver-typescript'
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

‎README.md

+28-12
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,55 @@
11
# eslint-import-resolver-typescript
22

3-
[![GitHub Actions](https://github.com/alexgorbatchev/eslint-import-resolver-typescript/workflows/CI/badge.svg)](https://github.com/alexgorbatchev/eslint-import-resolver-typescript/actions/workflows/ci.yml)
4-
[![type-coverage](https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Falexgorbatchev%2Feslint-import-resolver-typescript%2Fmaster%2Fpackage.json)](https://github.com/plantain-00/type-coverage)
3+
[![GitHub Actions](https://github.com/import-js/eslint-import-resolver-typescript/workflows/CI/badge.svg)](https://github.com/import-js/eslint-import-resolver-typescript/actions/workflows/ci.yml)
4+
[![type-coverage](https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Fimport-js%2Feslint-import-resolver-typescript%2Fmaster%2Fpackage.json)](https://github.com/plantain-00/type-coverage)
55
[![npm](https://img.shields.io/npm/v/eslint-import-resolver-typescript.svg)](https://www.npmjs.com/package/eslint-import-resolver-typescript)
6-
[![GitHub Release](https://img.shields.io/github/release/alexgorbatchev/eslint-import-resolver-typescript)](https://github.com/alexgorbatchev/eslint-import-resolver-typescript/releases)
6+
[![GitHub Release](https://img.shields.io/github/release/import-js/eslint-import-resolver-typescript)](https://github.com/import-js/eslint-import-resolver-typescript/releases)
77

8-
[![David Peer](https://img.shields.io/david/peer/alexgorbatchev/eslint-import-resolver-typescript.svg)](https://david-dm.org/alexgorbatchev/eslint-import-resolver-typescript?type=peer)
9-
[![David](https://img.shields.io/david/alexgorbatchev/eslint-import-resolver-typescript.svg)](https://david-dm.org/alexgorbatchev/eslint-import-resolver-typescript)
10-
[![David Dev](https://img.shields.io/david/dev/alexgorbatchev/eslint-import-resolver-typescript.svg)](https://david-dm.org/alexgorbatchev/eslint-import-resolver-typescript?type=dev)
8+
[![David Peer](https://img.shields.io/david/peer/import-js/eslint-import-resolver-typescript.svg)](https://david-dm.org/import-js/eslint-import-resolver-typescript?type=peer)
9+
[![David](https://img.shields.io/david/import-js/eslint-import-resolver-typescript.svg)](https://david-dm.org/import-js/eslint-import-resolver-typescript)
10+
[![David Dev](https://img.shields.io/david/dev/import-js/eslint-import-resolver-typescript.svg)](https://david-dm.org/import-js/eslint-import-resolver-typescript?type=dev)
1111

1212
[![Conventional Commits](https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
1313
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
1414
[![Code Style: Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
15-
[![codechecks.io](https://raw.githubusercontent.com/codechecks/docs/master/images/badges/badge-default.svg?sanitize=true)](https://codechecks.io)
15+
[![changesets](https://img.shields.io/badge/maintained%20with-changesets-176de3.svg)](https://github.com/atlassian/changesets)
1616

1717
This plugin adds TypeScript support to [`eslint-plugin-import`](https://www.npmjs.com/package/eslint-plugin-import).
1818

1919
This means you can:
2020

21-
- `import`/`require` files with extension `.ts`/`.tsx`!
21+
- `import`/`require` files with extension `.cts`/`.mts`/`.ts`/`.tsx`!
2222
- Use [`paths`](https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping) defined in `tsconfig.json`.
2323
- Prefer resolve `@types/*` definitions over plain `.js`.
2424
- Multiple tsconfigs support just like normal.
25+
- `exports` fields support in `package.json`
2526

2627
## TOC <!-- omit in toc -->
2728

2829
- [Notice](#notice)
2930
- [Installation](#installation)
3031
- [Configuration](#configuration)
3132
- [Contributing](#contributing)
33+
- [Changelog](#changelog)
34+
- [License](#license)
3235

3336
## Notice
3437

3538
After version 2.0.0, `.d.ts` will take higher priority then normal `.js` files on resolving `node_modules` packages in favor of `@types/*` definitions.
3639

37-
If you're facing some problems on rules `import/default` or `import/named` from [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import), do not post any issue here, because they are just working exactly as [expected](https://github.com/alexgorbatchev/eslint-import-resolver-typescript/issues/31#issuecomment-539751607) on our sides, take <https://github.com/benmosher/eslint-plugin-import/issues/1525> as reference or post a new issue to [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) instead.
40+
If you're facing some problems on rules `import/default` or `import/named` from [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import), do not post any issue here, because they are just working exactly as [expected](https://github.com/import-js/eslint-import-resolver-typescript/issues/31#issuecomment-539751607) on our sides, take <https://github.com/benmosher/eslint-plugin-import/issues/1525> as reference or post a new issue to [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) instead.
3841

3942
## Installation
4043

4144
```sh
4245
# npm
43-
npm i -D eslint-plugin-import @typescript-eslint/parser eslint-import-resolver-typescript
46+
npm i -D eslint-plugin-import eslint-import-resolver-typescript
47+
48+
# pnpm
49+
pnpm i -D eslint-plugin-import eslint-import-resolver-typescript
4450

4551
# yarn
46-
yarn add -D eslint-plugin-import @typescript-eslint/parser eslint-import-resolver-typescript
52+
yarn add -D eslint-plugin-import eslint-import-resolver-typescript
4753
```
4854

4955
## Configuration
@@ -99,6 +105,16 @@ Add the following to your `.eslintrc` config:
99105
- Make sure that `yarn lint` passes without conflicts.
100106
- Make sure your code changes match our [type-coverage](https://github.com/plantain-00/type-coverage) settings: `yarn type-coverage`.
101107

102-
We have [GitHub Actions](https://github.com/alexgorbatchev/eslint-import-resolver-typescript/actions) which will run the above commands on your PRs.
108+
We have [GitHub Actions](https://github.com/import-js/eslint-import-resolver-typescript/actions) which will run the above commands on your PRs.
103109

104110
If either fails, we won't be able to merge your PR until it's fixed.
111+
112+
## Changelog
113+
114+
Detailed changes for each release are documented in [CHANGELOG.md](./CHANGELOG.md).
115+
116+
## License
117+
118+
[ISC][]
119+
120+
[isc]: https://opensource.org/licenses/ISC

‎package.json

+12-11
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"name": "eslint-import-resolver-typescript",
33
"version": "3.1.1",
44
"type": "module",
5-
"description": "TypeScript .ts .tsx module resolver for `eslint-plugin-import`.",
6-
"repository": "https://github.com/alexgorbatchev/eslint-import-resolver-typescript",
5+
"description": "TypeScript `.cts`, `.mts`, `.ts`, `.tsx` module resolver for `eslint-plugin-import`",
6+
"repository": "git+https://github.com/import-js/eslint-import-resolver-typescript",
77
"author": "Alex Gorbatchev <alex.gorbatchev@gmail.com>",
88
"contributors": [
9-
"JounQin <admin@1stg.me>"
9+
"JounQin (https://www.1stG.me) <admin@1stg.me>"
1010
],
1111
"license": "ISC",
1212
"packageManager": "yarn@1.22.19",
@@ -23,7 +23,7 @@
2323
},
2424
"./package.json": "./package.json"
2525
},
26-
"es2015": "lib/index.es2015.mjs",
26+
"es2015": "lib/index.js",
2727
"fesm2015": "lib/index.es2015.mjs",
2828
"types": "lib/index.d.ts",
2929
"files": [
@@ -45,8 +45,8 @@
4545
"lint:es": "eslint src --cache -f friendly",
4646
"lint:tsc": "tsc --noEmit",
4747
"prepare": "simple-git-hooks && yarn-deduplicate --strategy fewer || exit 0",
48-
"prepublishOnly": "yarn build",
49-
"release": "sh scripts/release.sh",
48+
"prerelease": "yarn build",
49+
"release": "changesets publish",
5050
"test": "run-p test:*",
5151
"test:multipleEslintrcs": "eslint --ext ts,tsx tests/multipleEslintrcs",
5252
"test:multipleTsconfigs": "eslint --ext ts,tsx tests/multipleTsconfigs",
@@ -63,15 +63,17 @@
6363
},
6464
"dependencies": {
6565
"debug": "^4.3.4",
66-
"enhanced-resolve": "^5.9.3",
67-
"get-tsconfig": "^4.0.6",
66+
"enhanced-resolve": "^5.10.0",
67+
"get-tsconfig": "^4.1.0",
6868
"globby": "^13.1.2",
6969
"is-core-module": "^2.9.0",
7070
"is-glob": "^4.0.3",
7171
"synckit": "^0.7.1"
7272
},
7373
"devDependencies": {
74-
"@1stg/lib-config": "^6.3.0",
74+
"@1stg/lib-config": "^7.0.0",
75+
"@changesets/changelog-github": "^0.4.5",
76+
"@changesets/cli": "^2.23.0",
7577
"@mozilla/glean": "^1.0.0",
7678
"@types/debug": "^4.1.7",
7779
"@types/enhanced-resolve": "^3.0.7",
@@ -80,10 +82,9 @@
8082
"@types/node": "^18.0.0",
8183
"@types/unist": "^2.0.6",
8284
"dummy.js": "link:dummy.js",
83-
"eslint-import-resolver-typescript": "link:.",
8485
"react": "^18.2.0",
8586
"standard-version": "^9.5.0",
86-
"type-coverage": "^2.21.1",
87+
"type-coverage": "^2.21.2",
8788
"typescript": "^4.7.4"
8889
},
8990
"resolutions": {

‎scripts/release.sh

-9
This file was deleted.

0 commit comments

Comments
 (0)