Skip to content
This repository was archived by the owner on Mar 28, 2024. It is now read-only.

Commit b6a562c

Browse files
committed
feat(yarn): pnp
1 parent aaf3818 commit b6a562c

21 files changed

+182
-19
lines changed

.vscode/settings.json

+16-3
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,21 @@
2727
"cSpell.words": [
2828
"Alwatr"
2929
],
30-
"typescript.tsdk": "node_modules/typescript/lib",
30+
"typescript.tsdk": ".yarn/sdks/typescript/lib",
3131
"git.autoStash": true,
32-
"git.branchProtection": ["main", "next"],
33-
"githubPullRequests.ignoredPullRequestBranches": ["main", "next"]
32+
"git.branchProtection": [
33+
"main",
34+
"next"
35+
],
36+
"githubPullRequests.ignoredPullRequestBranches": [
37+
"main",
38+
"next"
39+
],
40+
"search.exclude": {
41+
"**/.yarn": true,
42+
"**/.pnp.*": true
43+
},
44+
"eslint.nodePath": ".yarn/sdks",
45+
"prettier.prettierPath": ".yarn/sdks/prettier/index.cjs",
46+
"typescript.enablePromptUseWorkspaceTsdk": true
3447
}

.yarn/sdks/eslint/package.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "eslint",
3+
"version": "8.53.0-sdk",
4+
"main": "./lib/api.js",
5+
"type": "commonjs",
6+
"bin": {
7+
"eslint": "./bin/eslint.js"
8+
},
9+
"exports": {
10+
"./package.json": "./package.json",
11+
".": "./lib/api.js",
12+
"./use-at-your-own-risk": "./lib/unsupported-api.js"
13+
}
14+
}

.yarn/sdks/integrations.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This file is automatically generated by @yarnpkg/sdks.
2+
# Manual changes might be lost!
3+
4+
integrations:
5+
- vscode

.yarn/sdks/prettier/bin/prettier.cjs

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env node
2+
3+
const {existsSync} = require(`fs`);
4+
const {createRequire} = require(`module`);
5+
const {resolve} = require(`path`);
6+
7+
const relPnpApiPath = "../../../../.pnp.cjs";
8+
9+
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
10+
const absRequire = createRequire(absPnpApiPath);
11+
12+
if (existsSync(absPnpApiPath)) {
13+
if (!process.versions.pnp) {
14+
// Setup the environment to be able to require prettier/bin/prettier.cjs
15+
require(absPnpApiPath).setup();
16+
}
17+
}
18+
19+
// Defer to the real prettier/bin/prettier.cjs your application uses
20+
module.exports = absRequire(`prettier/bin/prettier.cjs`);

.yarn/sdks/prettier/index.cjs

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env node
2+
3+
const {existsSync} = require(`fs`);
4+
const {createRequire} = require(`module`);
5+
const {resolve} = require(`path`);
6+
7+
const relPnpApiPath = "../../../.pnp.cjs";
8+
9+
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
10+
const absRequire = createRequire(absPnpApiPath);
11+
12+
if (existsSync(absPnpApiPath)) {
13+
if (!process.versions.pnp) {
14+
// Setup the environment to be able to require prettier
15+
require(absPnpApiPath).setup();
16+
}
17+
}
18+
19+
// Defer to the real prettier your application uses
20+
module.exports = absRequire(`prettier`);

.yarn/sdks/prettier/package.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "prettier",
3+
"version": "3.0.3-sdk",
4+
"main": "./index.cjs",
5+
"type": "commonjs",
6+
"bin": "./bin/prettier.cjs"
7+
}

.yarn/sdks/typescript/bin/tsc

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env node
2+
3+
const {existsSync} = require(`fs`);
4+
const {createRequire} = require(`module`);
5+
const {resolve} = require(`path`);
6+
7+
const relPnpApiPath = "../../../../.pnp.cjs";
8+
9+
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
10+
const absRequire = createRequire(absPnpApiPath);
11+
12+
if (existsSync(absPnpApiPath)) {
13+
if (!process.versions.pnp) {
14+
// Setup the environment to be able to require typescript/bin/tsc
15+
require(absPnpApiPath).setup();
16+
}
17+
}
18+
19+
// Defer to the real typescript/bin/tsc your application uses
20+
module.exports = absRequire(`typescript/bin/tsc`);

.yarn/sdks/typescript/bin/tsserver

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env node
2+
3+
const {existsSync} = require(`fs`);
4+
const {createRequire} = require(`module`);
5+
const {resolve} = require(`path`);
6+
7+
const relPnpApiPath = "../../../../.pnp.cjs";
8+
9+
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
10+
const absRequire = createRequire(absPnpApiPath);
11+
12+
if (existsSync(absPnpApiPath)) {
13+
if (!process.versions.pnp) {
14+
// Setup the environment to be able to require typescript/bin/tsserver
15+
require(absPnpApiPath).setup();
16+
}
17+
}
18+
19+
// Defer to the real typescript/bin/tsserver your application uses
20+
module.exports = absRequire(`typescript/bin/tsserver`);

.yarn/sdks/typescript/package.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "typescript",
3+
"version": "5.2.2-sdk",
4+
"main": "./lib/typescript.js",
5+
"type": "commonjs",
6+
"bin": {
7+
"tsc": "./bin/tsc",
8+
"tsserver": "./bin/tsserver"
9+
}
10+
}

.yarnrc.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
nodeLinker: node-modules

demo/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"@alwatr/validator": "workspace:^"
1414
},
1515
"devDependencies": {
16-
"@alwatr/type": "workspace:^"
16+
"@alwatr/type": "workspace:^",
17+
"@types/node": "^20.9.0"
1718
}
1819
}

package.json

+10-11
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,29 @@
1414
"demo"
1515
],
1616
"scripts": {
17-
"l": "yarn lint",
18-
"b": "yarn build",
17+
"l": "yarn run lint",
18+
"b": "yarn run build",
1919
"br": "run-s build build:r",
20-
"c": "yarn clean",
20+
"c": "yarn run clean",
2121
"cb": "run-s clean build",
2222
"s": "run-s build serve",
23-
"w": "yarn watch",
24-
"f": "yarn format",
25-
"fl": "yarn format:eslint",
26-
"fp": "yarn format:prettier",
23+
"w": "yarn run watch",
24+
"f": "yarn run format",
25+
"fl": "yarn run format:eslint",
26+
"fp": "yarn run format:prettier",
2727
"rl": "run-s pull clean build release",
2828
"lint": "run-s lint:*",
2929
"lint:ts": "eslint . --config .eslintrc.json --ext .ts",
3030
"build": "run-s build:ts build:r",
3131
"build:ts": "tsc --build",
3232
"build:r": "lerna run build",
3333
"format": "run-s format:prettier format:eslint",
34-
"format:eslint": "yarn lint:ts --fix",
34+
"format:eslint": "yarn run lint:ts --fix",
3535
"format:prettier": "prettier . --ignore-path .gitignore --write",
36-
"clean": "git clean -d -x -f --exclude=node_modules --exclude=*.env --exclude=_data",
36+
"clean": "git clean -d -x -f --exclude=node_modules --exclude='*.env' --exclude=_data --exclude='.pnp*' --exclude=.yarn",
3737
"serve": "wds",
3838
"watch": "run-p watch:* serve",
39-
"watch:ts": "yarn build:ts --watch --preserveWatchOutput",
39+
"watch:ts": "yarn run build:ts --watch --preserveWatchOutput",
4040
"pull": "git pull",
4141
"release": "lerna version",
4242
"publish": "lerna publish from-package"
@@ -58,7 +58,6 @@
5858
"eslint-plugin-import": "^2.29.0",
5959
"npm-run-all": "^4.1.5",
6060
"prettier": "^3.0.3",
61-
"tslib": "^2.6.2",
6261
"typescript": "^5.2.2"
6362
},
6463
"packageManager": "[email protected]"

packages/crypto/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@
4141
},
4242
"dependencies": {
4343
"@alwatr/logger": "workspace:^",
44+
"@alwatr/math": "workspace:^",
4445
"@alwatr/util": "workspace:^",
4546
"tslib": "^2.6.2"
47+
},
48+
"devDependencies": {
49+
"@types/node": "^20.9.0"
4650
}
4751
}

packages/fetch/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"tslib": "^2.6.2"
4040
},
4141
"devDependencies": {
42-
"@alwatr/type": "workspace:^"
42+
"@alwatr/type": "workspace:^",
43+
"@types/node": "^20.9.0"
4344
}
4445
}

packages/logger/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,8 @@
3333
},
3434
"dependencies": {
3535
"tslib": "^2.6.2"
36+
},
37+
"devDependencies": {
38+
"@types/node": "^20.9.0"
3639
}
3740
}

packages/math/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,8 @@
3232
"dependencies": {
3333
"@alwatr/logger": "workspace:^",
3434
"tslib": "^2.6.2"
35+
},
36+
"devDependencies": {
37+
"@types/node": "^20.9.0"
3538
}
3639
}

packages/nano-server/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,12 @@
3232
},
3333
"dependencies": {
3434
"@alwatr/logger": "workspace:^",
35+
"@alwatr/math": "workspace:^",
3536
"@alwatr/util": "workspace:^",
3637
"tslib": "^2.6.2"
3738
},
3839
"devDependencies": {
39-
"@alwatr/type": "workspace:^"
40+
"@alwatr/type": "workspace:^",
41+
"@types/node": "^20.9.0"
4042
}
4143
}

packages/type/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,8 @@
2727
"homepage": "https://github.com/Alwatr/eslib/tree/next/packages/type#readme",
2828
"bugs": {
2929
"url": "https://github.com/Alwatr/eslib/issues"
30+
},
31+
"devDependencies": {
32+
"@types/node": "^20.9.0"
3033
}
3134
}

packages/util/package.json

+2
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,13 @@
4141
},
4242
"dependencies": {
4343
"@alwatr/logger": "workspace:^",
44+
"@alwatr/math": "workspace:^",
4445
"@alwatr/type": "workspace:^",
4546
"@alwatr/util": "workspace:^",
4647
"tslib": "^2.6.2"
4748
},
4849
"devDependencies": {
50+
"@types/node": "^20.9.0",
4951
"flatstr": "^1.0.12"
5052
}
5153
}

packages/validator/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,12 @@
2929
"url": "https://github.com/Alwatr/eslib/issues"
3030
},
3131
"dependencies": {
32+
"@alwatr/math": "workspace:^",
3233
"@alwatr/type": "workspace:^",
3334
"@alwatr/util": "workspace:^",
3435
"tslib": "^2.6.2"
36+
},
37+
"devDependencies": {
38+
"@types/node": "^20.9.0"
3539
}
3640
}

yarn.lock

+14-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ __metadata:
2727
resolution: "@alwatr/crypto@workspace:packages/crypto"
2828
dependencies:
2929
"@alwatr/logger": "workspace:^"
30+
"@alwatr/math": "workspace:^"
3031
"@alwatr/util": "workspace:^"
32+
"@types/node": "npm:^20.9.0"
3133
tslib: "npm:^2.6.2"
3234
languageName: unknown
3335
linkType: soft
@@ -43,6 +45,7 @@ __metadata:
4345
"@alwatr/type": "workspace:^"
4446
"@alwatr/util": "workspace:^"
4547
"@alwatr/validator": "workspace:^"
48+
"@types/node": "npm:^20.9.0"
4649
languageName: unknown
4750
linkType: soft
4851

@@ -53,6 +56,7 @@ __metadata:
5356
"@alwatr/logger": "workspace:^"
5457
"@alwatr/type": "workspace:^"
5558
"@alwatr/util": "workspace:^"
59+
"@types/node": "npm:^20.9.0"
5660
tslib: "npm:^2.6.2"
5761
languageName: unknown
5862
linkType: soft
@@ -61,6 +65,7 @@ __metadata:
6165
version: 0.0.0-use.local
6266
resolution: "@alwatr/logger@workspace:packages/logger"
6367
dependencies:
68+
"@types/node": "npm:^20.9.0"
6469
tslib: "npm:^2.6.2"
6570
languageName: unknown
6671
linkType: soft
@@ -70,6 +75,7 @@ __metadata:
7075
resolution: "@alwatr/math@workspace:packages/math"
7176
dependencies:
7277
"@alwatr/logger": "workspace:^"
78+
"@types/node": "npm:^20.9.0"
7379
tslib: "npm:^2.6.2"
7480
languageName: unknown
7581
linkType: soft
@@ -79,15 +85,19 @@ __metadata:
7985
resolution: "@alwatr/nano-server@workspace:packages/nano-server"
8086
dependencies:
8187
"@alwatr/logger": "workspace:^"
88+
"@alwatr/math": "workspace:^"
8289
"@alwatr/type": "workspace:^"
8390
"@alwatr/util": "workspace:^"
91+
"@types/node": "npm:^20.9.0"
8492
tslib: "npm:^2.6.2"
8593
languageName: unknown
8694
linkType: soft
8795

8896
"@alwatr/type@workspace:^, @alwatr/type@workspace:packages/type":
8997
version: 0.0.0-use.local
9098
resolution: "@alwatr/type@workspace:packages/type"
99+
dependencies:
100+
"@types/node": "npm:^20.9.0"
91101
languageName: unknown
92102
linkType: soft
93103

@@ -96,8 +106,10 @@ __metadata:
96106
resolution: "@alwatr/util@workspace:packages/util"
97107
dependencies:
98108
"@alwatr/logger": "workspace:^"
109+
"@alwatr/math": "workspace:^"
99110
"@alwatr/type": "workspace:^"
100111
"@alwatr/util": "workspace:^"
112+
"@types/node": "npm:^20.9.0"
101113
flatstr: "npm:^1.0.12"
102114
tslib: "npm:^2.6.2"
103115
languageName: unknown
@@ -107,8 +119,10 @@ __metadata:
107119
version: 0.0.0-use.local
108120
resolution: "@alwatr/validator@workspace:packages/validator"
109121
dependencies:
122+
"@alwatr/math": "workspace:^"
110123
"@alwatr/type": "workspace:^"
111124
"@alwatr/util": "workspace:^"
125+
"@types/node": "npm:^20.9.0"
112126
tslib: "npm:^2.6.2"
113127
languageName: unknown
114128
linkType: soft
@@ -1570,7 +1584,6 @@ __metadata:
15701584
eslint-plugin-import: "npm:^2.29.0"
15711585
npm-run-all: "npm:^4.1.5"
15721586
prettier: "npm:^3.0.3"
1573-
tslib: "npm:^2.6.2"
15741587
typescript: "npm:^5.2.2"
15751588
languageName: unknown
15761589
linkType: soft

0 commit comments

Comments
 (0)