Skip to content

Commit a1f5673

Browse files
authored
Merge branch 'main' into re-add-winston
2 parents bc73fe5 + ee13170 commit a1f5673

Some content is hidden

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

41 files changed

+718
-393
lines changed

.eslintrc.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Close stalled issues and PRs
2+
on:
3+
schedule:
4+
- cron: 0 0 * * *
5+
6+
env:
7+
CLOSE_MESSAGE: >
8+
Closing this because it has stalled. Feel free to reopen if this issue/PR is
9+
still relevant, or to ping the collaborator who labelled it stalled if you
10+
have any questions.
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
stale:
17+
permissions:
18+
issues: write # for actions/stale to close stale issues
19+
pull-requests: write # for actions/stale to close stale PRs
20+
if: github.repository == 'nodejs/citgm'
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
24+
with:
25+
repo-token: ${{ secrets.GITHUB_TOKEN }}
26+
days-before-close: 30
27+
stale-pr-label: stalled
28+
stale-issue-label: stalled
29+
close-issue-message: ${{ env.CLOSE_MESSAGE }}
30+
close-pr-message: ${{ env.CLOSE_MESSAGE }}
31+
# used to filter issues to check whether or not should be closed, avoids hitting maximum operations allowed if needing to paginate through all open issues
32+
only-labels: stalled
33+
# max requests it will send per run to the GitHub API before it deliberately exits to avoid hitting API rate limits
34+
operations-per-run: 500

.github/workflows/nodejs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
lint:
11-
name: Lint using ESLint
11+
name: Lint using ESLint and Prettier
1212

1313
runs-on: ubuntu-latest
1414

@@ -19,7 +19,7 @@ jobs:
1919
show-progress: false
2020

2121
- name: Use LTS Node.js
22-
uses: actions/setup-node@v3
22+
uses: actions/setup-node@v4
2323
with:
2424
node-version: lts/*
2525

.github/workflows/test-module.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
node-version:
3939
- 18.x
4040
- 20.x
41+
- 21.x
42+
- 22.x
4143

4244
runs-on: ${{ matrix.os }}
4345

@@ -50,7 +52,7 @@ jobs:
5052
show-progress: false
5153

5254
- name: Use Node.js ${{ matrix.node-version }}
53-
uses: actions/setup-node@v3
55+
uses: actions/setup-node@v4
5456
with:
5557
node-version: ${{ matrix.node-version }}
5658

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ node_modules/
22
test/scaffold/*/node_modules
33
test/.*
44
coverage/
5+
/.tap
56
.nyc_output/
67
.eslintcache

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/README.md
2+
/test/fixtures/custom-lookup-broken.json

CONTRIBUTING.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ This is for adding a module to be included in the default `citgm-all` runs.
5252
- Module source code must be on Github.
5353
- Published versions must include a tag on Github
5454
- The test process must be executable with only the commands
55-
`npm install && npm test` or (`yarn install && yarn test`) using the tarball
56-
downloaded from the Github tag mentioned above
55+
`npm install && npm test` or (`yarn install && yarn test` or
56+
`pnpm install && pnpm test`) using the tarball downloaded from the GitHub tag
57+
mentioned above
5758
- The tests pass on supported major release lines
5859
- The maintainers of the module remain responsive when there are problems
5960
- At least one module maintainer must be added to the lookup maintainers field

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
citgm is a simple tool for pulling down an arbitrary module from npm and testing
44
it using a specific version of the node runtime.
55

6-
[![Build Status](https://github.com/nodejs/citgm/workflows/Node.js%20CI/badge.svg?branch=main)](https://github.com/nodejs/citgm/actions?query=workflow%3A%22Node.js+CI%22)
6+
[![Build Status](https://github.com/nodejs/citgm/actions/workflows/nodejs.yml/badge.svg?branch=main)](https://github.com/nodejs/citgm/actions/workflows/nodejs.yml)
77

88
The Node.js project uses citgm to smoke test our releases and controversial
99
changes. The Jenkins job that utilizes citgm can be found
@@ -109,6 +109,7 @@ Options:
109109
--excludeTags tag1 tag2 Specify which tags to skip from the lookup (takes priority over includeTags)
110110
Module names are automatically added as tags.
111111
-y, --yarn Install and test the project using yarn instead of npm
112+
--pnpm Install and test the project using pnpm instead of npm
112113
```
113114

114115
When using a JSON config file, the properties need to be the same as the
@@ -134,13 +135,14 @@ For syntax, see [lookup.json](./lib/lookup.json), the available attributes are:
134135
"stripAnsi": true Strip ansi data from output stream of npm
135136
"sha": "<git-commit-sha>" Test against a specific commit
136137
"envVar" Pass an environment variable before running
137-
"install": ["install", "--param1", "--param2"] - Array of command line parameters passed to 'npm' or 'yarn' as install arguments
138+
"install": ["install", "--param1", "--param2"] - Array of command line parameters passed to `npm` or `yarn` or `pnpm` as install arguments
138139
"maintainers": ["user1", "user2"] - List of module maintainers to be contacted with issues
139140
"scripts": ["script1", "script2"] - List of scripts from package.json to run instead of 'test'
140141
"tags": ["tag1", "tag2"] Specify which tags apply to the module
141142
"useGitClone": true Use a shallow git clone instead of downloading the module
142143
"ignoreGitHead": Ignore the gitHead field if it exists and fallback to using github tags
143144
"yarn": Install and test the project using yarn instead of npm
145+
"pnpm": Install and test the project using pnpm instead of npm
144146
"timeout": Number of milliseconds before timeout. Applies separately to `install` and `test`
145147
```
146148

eslint.config.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import js from '@eslint/js';
2+
import prettier from 'eslint-config-prettier';
3+
import globals from 'globals';
4+
5+
export default [
6+
js.configs.recommended,
7+
prettier,
8+
{
9+
languageOptions: {
10+
globals: {
11+
...globals.node
12+
}
13+
},
14+
rules: {
15+
'capitalized-comments': [
16+
'error',
17+
'always',
18+
{ ignoreConsecutiveComments: true }
19+
],
20+
eqeqeq: ['error', 'always'],
21+
'no-template-curly-in-string': 'error',
22+
'no-useless-escape': 'error',
23+
'no-var': 'error',
24+
'padding-line-between-statements': [
25+
'error',
26+
{ blankLine: 'always', prev: 'directive', next: '*' }
27+
],
28+
'prefer-arrow-callback': 'error',
29+
'prefer-template': 'error',
30+
strict: 'error'
31+
}
32+
},
33+
{
34+
files: ['test/fixtures/**'],
35+
languageOptions: {
36+
sourceType: 'commonjs'
37+
}
38+
}
39+
];

lib/bin/citgm-all.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ const options = {
6969
tmpDir: app.tmpDir,
7070
customTest: app.customTest,
7171
yarn: app.yarn,
72+
pnpm: app.pnpm,
7273
includeTags: app.includeTags || [],
7374
excludeTags: app.excludeTags || []
7475
};

0 commit comments

Comments
 (0)