Skip to content

Commit a676428

Browse files
committed
Bundle the code
1 parent a459759 commit a676428

File tree

89 files changed

+994
-446
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+994
-446
lines changed
Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,39 @@
1-
name: Test
1+
name: CI
22

33
on:
44
push:
55
branches:
66
- main
7-
paths-ignore:
8-
- '**.md'
9-
- '**.ya?ml'
10-
- '!pnpm-lock.yaml'
11-
- '!.github/workflows/test.yml'
127
pull_request:
138
branches:
149
- main
15-
paths-ignore:
16-
- '**.md'
17-
- '**.ya?ml'
18-
- '!pnpm-lock.yaml'
19-
- '!.github/workflows/test.yml'
2010

2111
concurrency:
2212
group: ${{ github.workflow }}-${{ github.ref }}
2313
cancel-in-progress: true
2414

2515
jobs:
16+
lint:
17+
name: Lint
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v5
22+
23+
- name: Setup
24+
uses: ./.github/actions/setup
25+
26+
- name: Lint
27+
run: pnpm run lint
28+
29+
- name: Format
30+
run: pnpm run format
31+
32+
- name: Typecheck
33+
run: pnpm run typecheck
34+
2635
test:
27-
name: Node.js ${{ matrix.node }} on ${{ matrix.os.name }}
36+
name: Test (Node.js ${{ matrix.node }}, ${{ matrix.os.name }})
2837
runs-on: ${{ matrix.os.version }}
2938
strategy:
3039
fail-fast: false
@@ -49,11 +58,8 @@ jobs:
4958
with:
5059
node-version: ${{ matrix.node }}
5160

52-
- name: Install concurrently 🐶🥣
53-
run: pnpm add --global concurrently
54-
55-
- name: Build & Test
56-
run: concurrently --prefix none --group "pnpm:build" "pnpm:test --coverage" "pnpm:test:smoke"
61+
- name: Test
62+
run: pnpm run test:all --coverage
5763

5864
- name: Submit coverage
5965
uses: coverallsapp/github-action@master

.github/workflows/lint-format.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

bin.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env node
2+
import('./dist/bin.js');
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
#!/usr/bin/env node
21
import yargs from 'yargs';
32
import { hideBin } from 'yargs/helpers';
43

5-
import { assertDeprecated } from '../src/assert.js';
6-
import * as defaults from '../src/defaults.js';
7-
import { concurrently } from '../src/index.js';
8-
import { castArray } from '../src/utils.js';
9-
import { readPackageJson } from './read-package-json.js';
4+
import { assertDeprecated } from '../lib/assert.js';
5+
import * as defaults from '../lib/defaults.js';
6+
import { concurrently } from '../lib/index.js';
7+
import { castArray } from '../lib/utils.js';
8+
import { version } from '../package.json' with { type: 'json' };
109

11-
const version = String(readPackageJson().version);
1210
const epilogue = `For documentation and more examples, visit:\nhttps://github.com/open-cli-tools/concurrently/tree/v${version}/docs`;
1311

1412
// Clean-up arguments (yargs expects only the arguments after the program name)

bin/read-package-json.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

eslint.config.js

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,19 @@ export default defineConfig(
2121
},
2222
},
2323
eslint.configs.recommended,
24-
tseslint.configs.recommended,
24+
tseslint.configs.recommendedTypeChecked,
25+
{
26+
languageOptions: {
27+
parserOptions: {
28+
projectService: true,
29+
tsconfigRootDir: import.meta.dirname,
30+
},
31+
},
32+
},
33+
{
34+
files: ['**/*.js', '**/*.spec.ts', '**/__fixtures__/**/*', 'tests/**/*'],
35+
extends: [tseslint.configs.disableTypeChecked],
36+
},
2537
{
2638
rules: {
2739
curly: 'error',
@@ -30,6 +42,19 @@ export default defineConfig(
3042
'no-console': 'error',
3143
'prefer-const': 'error',
3244
'prefer-object-spread': 'error',
45+
'@typescript-eslint/prefer-promise-reject-errors': 'off',
46+
},
47+
},
48+
{
49+
files: ['**/*.ts'],
50+
ignores: ['**/*.spec.ts', '**/__fixtures__/**/*', 'tests/**/*'],
51+
rules: {
52+
'@typescript-eslint/consistent-type-imports': 'error',
53+
'@typescript-eslint/no-import-type-side-effects': 'error',
54+
'@typescript-eslint/consistent-type-exports': [
55+
'error',
56+
{ fixMixedExportsWithInlineTypeSpecifier: true },
57+
],
3358
},
3459
},
3560
{
@@ -42,7 +67,7 @@ export default defineConfig(
4267
'simple-import-sort/exports': 'error',
4368
'import/first': 'error',
4469
'import/newline-after-import': 'error',
45-
'import/no-duplicates': 'error',
70+
'import/no-duplicates': ['error', { 'prefer-inline': true }],
4671
},
4772
},
4873
{

index.d.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

index.js

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import EventEmitter from 'events';
2-
import { PassThrough, Writable } from 'stream';
1+
import EventEmitter from 'node:events';
2+
import { PassThrough, Writable } from 'node:stream';
3+
34
import { vi } from 'vitest';
45

56
import { ChildProcess, CloseEvent, Command, CommandInfo } from '../command.js';

0 commit comments

Comments
 (0)