Skip to content

Commit c609caf

Browse files
authored
fix(package): pnpm workspace packages filtering (#15)
1 parent 20bb006 commit c609caf

File tree

7 files changed

+7
-11
lines changed

7 files changed

+7
-11
lines changed

eslint.config.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
import { createRequire } from 'module';
21
import pluginJs from '@eslint/js';
32
import configPrettier from 'eslint-config-prettier';
43
import pluginImportX from 'eslint-plugin-import-x';
54
import globals from 'globals';
65
import { config, configs as configsTs, parser } from 'typescript-eslint';
76

8-
const pkg = createRequire(import.meta.url)('./package.json');
9-
107
export default config(
118
{
129
files: ['**/*.{js,mjs,cjs,jsx,ts,cts,mts,tsx,vue}'],
@@ -20,7 +17,6 @@ export default config(
2017
{
2118
settings: {
2219
'import-x/resolver': { typescript: true, node: true },
23-
'import-x/internal-regex': RegExp(`^${pkg.name}.*`),
2420
},
2521
rules: {
2622
'import-x/order': ['error', { alphabetize: { order: 'asc' } }],

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@coldrun/monorepo-typescript",
2+
"name": "monorepo-typescript",
33
"private": true,
44
"author": "Coldrun <info@coldrun.com>",
55
"type": "module",

packages/playground/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@coldrun/monorepo-typescript-playground",
2+
"name": "@monorepo-typescript/playground",
33
"private": true,
44
"version": "0.1.0",
55
"type": "module",
@@ -10,7 +10,7 @@
1010
"preview": "vite preview"
1111
},
1212
"dependencies": {
13-
"@coldrun/monorepo-typescript-shared": "workspace:*"
13+
"@monorepo-typescript/shared": "workspace:*"
1414
},
1515
"devDependencies": {
1616
"vite": "^5.4.3"

packages/playground/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import './style.css';
2+
import { isCallable } from '@monorepo-typescript/shared';
23
import viteLogo from '../public/vite.svg';
34
import { setupCounter } from './counter.ts';
45
import typescriptLogo from './typescript.svg';
5-
import { isCallable } from '@coldrun/monorepo-typescript-shared';
66

77
document.querySelector<HTMLDivElement>('#app')!.innerHTML = `
88
<div>

packages/shared/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@coldrun/monorepo-typescript-shared",
2+
"name": "@monorepo-typescript/shared",
33
"private": true,
44
"version": "0.1.0",
55
"type": "module",

pnpm-lock.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
packages:
2-
- 'packages/*'
2+
- "packages/**"

0 commit comments

Comments
 (0)