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

use pnpm 7.x #3568

Merged
merged 8 commits into from Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/eslint-plugin-security",
"comment": "Update resolution for typescript-eslint/parser",
"type": "none"
}
],
"packageName": "@rushstack/eslint-plugin-security"
}
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/eslint-plugin",
"comment": "Update resolution for typescript-eslint/parser",
"type": "none"
}
],
"packageName": "@rushstack/eslint-plugin"
}
2 changes: 1 addition & 1 deletion common/config/rush/.npmrc
Expand Up @@ -25,4 +25,4 @@ always-auth=false
public-hoist-pattern=
TheLarkInn marked this conversation as resolved.
Show resolved Hide resolved
# Don't hoist in common/temp/node_modules/.pnpm/node_modules
hoist=false
hoist-pattern=
hoist-pattern=
Expand Up @@ -6,7 +6,13 @@ import { noUnsafeRegExp } from './no-unsafe-regexp';

const { RuleTester } = ESLintUtils;
const ruleTester = new RuleTester({
parser: '@typescript-eslint/parser'
/*
* The underlying API requires an absolute path. `@typescript-eslint/utils` calls `require.resolve()` on the input
* and forces it to be of type '@typescript-eslint/parser' but does not have a dependency on `@typescript-eslint/parser`
* This means that it will always fail to resolve in a strict environment.
* Fortunately `require.resolve(absolutePath)` returns `absolutePath`, so we can resolve it first and cast.
*/
parser: require.resolve('@typescript-eslint/parser') as '@typescript-eslint/parser'
dmichon-msft marked this conversation as resolved.
Show resolved Hide resolved
});

ruleTester.run('no-unsafe-regexp', noUnsafeRegExp, {
Expand Down
2 changes: 1 addition & 1 deletion eslint/eslint-plugin-security/tsconfig.json
Expand Up @@ -2,6 +2,6 @@
"extends": "./node_modules/@rushstack/heft-node-rig/profiles/default/tsconfig-base.json",

"compilerOptions": {
"types": ["heft-jest"]
"types": ["heft-jest", "node"]
}
}
8 changes: 7 additions & 1 deletion eslint/eslint-plugin/src/hoist-jest-mock.test.ts
Expand Up @@ -6,7 +6,13 @@ import { hoistJestMock } from './hoist-jest-mock';

const { RuleTester } = ESLintUtils;
const ruleTester = new RuleTester({
parser: '@typescript-eslint/parser',
/*
* The underlying API requires an absolute path. `@typescript-eslint/utils` calls `require.resolve()` on the input
* and forces it to be of type '@typescript-eslint/parser' but does not have a dependency on `@typescript-eslint/parser`
* This means that it will always fail to resolve in a strict environment.
* Fortunately `require.resolve(absolutePath)` returns `absolutePath`, so we can resolve it first and cast.
*/
parser: require.resolve('@typescript-eslint/parser') as '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module'
Expand Down
8 changes: 7 additions & 1 deletion eslint/eslint-plugin/src/no-new-null.test.ts
Expand Up @@ -6,7 +6,13 @@ import { noNewNullRule } from './no-new-null';

const { RuleTester } = ESLintUtils;
const ruleTester = new RuleTester({
parser: '@typescript-eslint/parser'
/*
* The underlying API requires an absolute path. `@typescript-eslint/utils` calls `require.resolve()` on the input
* and forces it to be of type '@typescript-eslint/parser' but does not have a dependency on `@typescript-eslint/parser`
* This means that it will always fail to resolve in a strict environment.
* Fortunately `require.resolve(absolutePath)` returns `absolutePath`, so we can resolve it first and cast.
*/
parser: require.resolve('@typescript-eslint/parser') as '@typescript-eslint/parser'
});

ruleTester.run('no-new-null', noNewNullRule, {
Expand Down
8 changes: 7 additions & 1 deletion eslint/eslint-plugin/src/typedef-var.test.ts
Expand Up @@ -6,7 +6,13 @@ import { typedefVar } from './typedef-var';

const { RuleTester } = ESLintUtils;
const ruleTester = new RuleTester({
parser: '@typescript-eslint/parser'
/*
* The underlying API requires an absolute path. `@typescript-eslint/utils` calls `require.resolve()` on the input
* and forces it to be of type '@typescript-eslint/parser' but does not have a dependency on `@typescript-eslint/parser`
* This means that it will always fail to resolve in a strict environment.
* Fortunately `require.resolve(absolutePath)` returns `absolutePath`, so we can resolve it first and cast.
*/
parser: require.resolve('@typescript-eslint/parser') as '@typescript-eslint/parser'
});

ruleTester.run('typedef-var', typedefVar, {
Expand Down
2 changes: 1 addition & 1 deletion rush.json
Expand Up @@ -26,7 +26,7 @@
* Specify one of: "pnpmVersion", "npmVersion", or "yarnVersion". See the Rush documentation
* for details about these alternatives.
*/
"pnpmVersion": "6.29.1",
"pnpmVersion": "7.9.5",

// "npmVersion": "6.14.15",
// "yarnVersion": "1.9.4",
Expand Down