Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adopt pnp #193

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions index.ts → .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021 Byndyusoft
* Copyright 2022 Byndyusoft
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,4 +14,12 @@
* limitations under the License.
*/

export * from "./src";
require("@rushstack/eslint-patch/modern-module-resolution");

module.exports = {
root: true,
extends: [
"@byndyusoft/eslint-config/header-apache-2.0",
"@byndyusoft/eslint-config/backend",
],
};
4 changes: 0 additions & 4 deletions .eslintrc.json

This file was deleted.

3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ TODO text
# Templates
*.dot text
*.ejs text
*.erb text
*.haml text
*.handlebars text
*.hbs text
Expand All @@ -91,6 +92,7 @@ TODO text
*.mustache text
*.njk text
*.phtml text
*.svelte text
*.tmpl text
*.tpl text
*.twig text
Expand All @@ -109,6 +111,7 @@ TODO text
package.json text eol=lf
package-lock.json text -diff
pnpm-lock.yaml text eol=lf -diff
.prettierrc text
yarn.lock text -diff
*.toml text
*.yaml text
Expand Down
24 changes: 0 additions & 24 deletions .github/dependabot.yaml

This file was deleted.

43 changes: 30 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
### https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore
### https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore

.idea/*

### https://github.com/github/gitignore/blob/master/Global/VisualStudioCode.gitignore
### https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore

.vscode/*
**/.vscode/*
*.code-workspace

# Local History for Visual Studio Code
.history/

### https://github.com/github/gitignore/blob/master/Node.gitignore
# Built Visual Studio Code Extensions
*.vsix

### https://github.com/github/gitignore/blob/main/Node.gitignore

# Logs
logs
Expand All @@ -19,6 +22,7 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
Expand Down Expand Up @@ -67,6 +71,9 @@ web_modules/
# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
Expand All @@ -82,9 +89,12 @@ web_modules/
# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
# dotenv environment variable files
.env
.env.test
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
Expand All @@ -107,6 +117,13 @@ dist
# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

Expand All @@ -123,13 +140,13 @@ dist
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
.pnp.*

### https://github.com/github/gitignore/blob/master/Global/Linux.gitignore
### https://github.com/github/gitignore/blob/main/Global/Linux.gitignore

*~

Expand All @@ -145,7 +162,7 @@ dist
# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
### https://github.com/github/gitignore/blob/main/Global/Windows.gitignore

# Windows thumbnail cache files
Thumbs.db
Expand All @@ -172,7 +189,7 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk

### https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
### https://github.com/github/gitignore/blob/main/Global/macOS.gitignore

# General
.DS_Store
Expand Down
5 changes: 5 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
trailingComma: "all",
endOfLine: "auto",
plugins: [require.resolve("prettier-plugin-packagejson")],
};
2 changes: 0 additions & 2 deletions .prettierrc.yaml

This file was deleted.

9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,10 @@
## Requirements

- Node.js v14 LTS or later
- npm or yarn
- Yarn

## Install

```bash
npm install ᐸPackage nameᐳ
```

or

```bash
yarn add ᐸPackage nameᐳ
```
Expand All @@ -34,6 +28,7 @@ yarn add ᐸPackage nameᐳ

- [@Byndyusoft/owners](https://github.com/orgs/Byndyusoft/teams/owners) <<[email protected]>>
- [@Byndyusoft/team](https://github.com/orgs/Byndyusoft/teams/team)
- [@KillWolfVlad](https://github.com/KillWolfVlad)

## License

Expand Down
26 changes: 11 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@
"files": [
"dist",
"src",
"index.ts",
"tsconfig.json",
"!dist/*.tsbuildinfo",
"!**/__tests__",
"!**/*spec.ts"
],
"scripts": {
"prebuild": "shx rm -rf ./dist",
"build": "tsc --project ./tsconfig.build.json",
"postinstall": "husky install && ts-patch install",
"build": "yarn run prebuild && yarn run build:src",
"build:src": "tsc --project ./tsconfig.build.json",
"postinstall": "husky install",
"lint": "yarn run lint:eslint && yarn run lint:markdown && yarn run lint:prettier",
"lint:eslint": "eslint --ignore-path ./.gitignore --max-warnings 0 --ext .ts,.js .",
"lint:eslint:fix": "eslint --ignore-path ./.gitignore --fix --ext .ts,.js .",
Expand All @@ -47,14 +46,10 @@
"!**/index.ts"
],
"coverageDirectory": "<rootDir>/coverage",
"coverageThreshold": {
"global": {
"branches": 100,
"functions": 100,
"lines": 100,
"statements": 100
}
},
"coverageReporters": [
"lcov",
"text"
],
"moduleFileExtensions": [
"ts",
"js"
Expand Down Expand Up @@ -82,9 +77,11 @@
"@byndyusoft/tsconfig": "^1.1.0",
"@commitlint/cli": "^17.0.2",
"@commitlint/config-conventional": "^17.0.2",
"@rushstack/eslint-patch": "^1.1.4",
"@types/jest": "^28.1.0",
"@types/node": "^18.0.3",
"eslint": "^8.16.0",
"eslint-import-resolver-typescript": "^3.2.5",
"husky": "^8.0.1",
"jest": "^28.1.0",
"jest-extended": "^2.0.0",
Expand All @@ -96,10 +93,9 @@
"semantic-release": "^19.0.2",
"shx": "^0.3.4",
"ts-jest": "^28.0.3",
"ts-patch": "^2.0.1",
"typescript": "^4.7.2",
"typescript-transform-paths": "^3.3.1"
"typescript": "^4.7.2"
},
"packageManager": "[email protected]",
"engines": {
"node": ">=14"
},
Expand Down
3 changes: 3 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["local>Byndyusoft/node-renovate-config"]
}
2 changes: 1 addition & 1 deletion src/__tests__/helloWorldService.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { HelloWorldService } from "~/src";
import { HelloWorldService } from "../helloWorldService";

describe("HelloWorldService", () => {
let helloWorldService: HelloWorldService;
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "./tsconfig.json",
"exclude": ["./dist", "./node_modules", "./test", "**/__tests__", "**/*spec.ts"]
"exclude": ["./dist", "./test", "**/__tests__", "**/*spec.ts"]
}
14 changes: 2 additions & 12 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
{
"extends": "@byndyusoft/tsconfig/tsconfig.node14.json",
"compilerOptions": {
// Modules
"baseUrl": "./",
"paths": {
"~/*": ["./*"]
},
// Emit
"outDir": "./dist",
// Editor Support
"plugins": [
{ "transform": "typescript-transform-paths" },
{ "transform": "typescript-transform-paths", "afterDeclarations": true }
]
"outDir": "./dist"
},
"exclude": ["./dist", "./node_modules"],
"exclude": ["./dist"],
"include": ["./**/*.ts"]
}
Loading