Skip to content

Commit

Permalink
GLSP-1022: Update dependencies (#1023)
Browse files Browse the repository at this point in the history
- In preparation for the 2.0.0 Release all config dependencies for the `@eclipse-glsp/config`, `@eclipse-glsp/config-test` and `@eclipse-glsp/dev` packages
have been updated to the latest version.
- Remove compile-time warnings regarding unfulfilled peerDependencies by adding a corresponding `devDependency` to the root package.json
- Update `@eclipse-glsp/ts-config` configuration files. 
   - Remove mocha types from default `ts-config.json` otherwise mocha is an indirect dependency even for projects that don't use mocha tests.
   - Add additional test config for mocha testing that can be consumed with `@eclipse-glsp/tsconfig/mocha´
 - Config package no longer includes a default typescript version
- Update READMEs of config packages
- Update eslint confiug. Use typscript corrsepondant rules for `no-shadow´
Part of #1022
  • Loading branch information
tortmayr committed Jun 5, 2023
1 parent 471cfb2 commit 11abc3d
Show file tree
Hide file tree
Showing 22 changed files with 1,944 additions and 1,451 deletions.
2 changes: 2 additions & 0 deletions dev-packages/CHANGELOG.md → CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
- [cli] Introduce [`@eclipse-glsp/cli`](https://www.npmjs.com/package/@eclipse-glsp/cli)
package to offer CLI tooling & utility scripts for GLSP projects. [#755](https://github.com/eclipse-glsp/glsp/pull/755) - Contributed on behalf of STMicroelectronics
- Contribute the `release` command to prepare & publish a new Github release for a specific GLSP component
- [deps] Updates dependencies of `@eclipse-glsp/config` and `@eclipse-glsp/config-test` packages to the latest version [#1023](https://github.com/eclipse-glsp/glsp/pull/1023)

### Breaking Changes

- [node] Update minimum requirements for Node to >=16.11.0 [#829](https://github.com/eclipse-glsp/glsp/pull/829)
- [config] Typescript is now a peerDependency, a concrete matching Typscript depdendency has to be provided by consuming projects[#1023](https://github.com/eclipse-glsp/glsp/pull/1023)

## [v1.0.0 - 30/06/2022](https://github.com/eclipse-glsp/glsp/releases/tag/v1.0.0)

Expand Down
13 changes: 6 additions & 7 deletions dev-packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,20 @@
"watch": "tsc -w"
},
"dependencies": {
"commander": "^9.4.0",
"glob": "^8.0.3",
"node-fetch": "2.6.7",
"commander": "^10.0.1",
"glob": "^10.2.6",
"node-fetch": "^2.6.11",
"readline-sync": "^1.4.10",
"semver": "^7.3.7",
"shelljs": "0.8.5"
"semver": "^7.5.1",
"shelljs": "^0.8.5"
},
"devDependencies": {
"@eclipse-glsp/config": "1.0.0-next",
"@types/glob": "^8.0.0",
"@types/node-fetch": "2.6.2",
"@types/readline-sync": "1.4.4",
"@types/semver": "7.3.12",
"@types/shelljs": "0.8.11",
"ts-node": "^10.9.1"
"@types/shelljs": "0.8.11"
},
"publishConfig": {
"access": "public"
Expand Down
1 change: 1 addition & 0 deletions dev-packages/cli/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { CheckHeaderCommand } from './commands/check-header';
import { CoverageReportCommand } from './commands/coverage-report';
import { ReleaseCommand } from './commands/release/release';
import { baseCommand } from './util/command-util';

export const COMMAND_VERSION = '1.1.0-next';

const app = baseCommand() //
Expand Down
13 changes: 8 additions & 5 deletions dev-packages/cli/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
{
"extends": "@eclipse-glsp/ts-config/tsconfig.json",
"extends": "@eclipse-glsp/ts-config",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib",
"baseUrl": "."
"baseUrl": ".",
"esModuleInterop": true,
"resolveJsonModule": true
},

"include": ["src"]
}
"include": [
"src"
]
}
2 changes: 1 addition & 1 deletion dev-packages/config-test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ yarn add --dev @eclipse-glsp/config-test

### Mocha

**Create a `.mocharc.json`**:
**Create a `.mocharc`**:

```json
{
Expand Down
10 changes: 5 additions & 5 deletions dev-packages/config-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@
"dependencies": {
"@eclipse-glsp/mocha-config": "1.0.0-next",
"@eclipse-glsp/nyc-config": "1.0.0-next",
"@istanbuljs/nyc-config-typescript": "^1.0.0",
"@types/chai": "^4.3.4",
"@istanbuljs/nyc-config-typescript": "^1.0.2",
"@types/chai": "^4.3.5",
"@types/mocha": "^10.0.1",
"@types/sinon": "^10.0.13",
"chai": "^4.3.7",
"ignore-styles": "^5.0.1",
"mocha": "^10.1.0",
"mocha": "^10.2.0",
"mocha-jenkins-reporter": "^0.4.8",
"nyc": "^15.0.0",
"nyc": "^15.1.0",
"reflect-metadata": "^0.1.13",
"sinon": "^15.0.0",
"sinon": "^15.1.0",
"ts-node": "^10.9.1"
},
"publishConfig": {
Expand Down
9 changes: 6 additions & 3 deletions dev-packages/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Provides a meta package that export common configuration objects for:

The package is available via npm and is used by all GLSP components implemented with Typescript.
ESLint and prettier are included as direct dependencies.
In addition, common GLSP dev dependencies like lerna,typescript,rimraf etc. are included.

## Components

Expand All @@ -31,14 +30,18 @@ yarn add --dev @eclipse-glsp/config

```json
{
"extends": "@eclipse-glsp/ts-config/tsconfig.json",
"extends": "@eclipse-glsp/ts-config",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib"
}
}
```

In addition, a custom configuration for projects that use `mocha` is available:

- `@eclipse-glsp/ts-config/mocha`

### ESLint

**Create a `.eslintrc.js`**:
Expand All @@ -65,7 +68,7 @@ module.exports = {
}
```

**Or add a `.prettierrc.json` to the workspace root**:
**Or add a `.prettierrc` file to the workspace root**:

```json
"@eclipse-glsp/prettier-config"
Expand Down
18 changes: 8 additions & 10 deletions dev-packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,18 @@
"@eclipse-glsp/eslint-config": "1.0.0-next",
"@eclipse-glsp/prettier-config": "1.0.0-next",
"@eclipse-glsp/ts-config": "1.0.0-next",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"eslint": "^8.29.0",
"eslint-config-prettier": "^8.5.0",
"@typescript-eslint/eslint-plugin": "^5.59.7",
"@typescript-eslint/parser": "^5.59.7",
"eslint": "^8.41.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-chai-friendly": "^0.7.2",
"eslint-plugin-deprecation": "^1.3.3",
"eslint-plugin-deprecation": "^1.4.1",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-no-null": "^1.0.2",
"lerna": "^6.1.0",
"prettier": "^2.8.0",
"prettier": "^2.8.8",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"typescript": "^4.9.3"
"rimraf": "^5.0.1"
},
"publishConfig": {
"access": "public"
Expand Down
16 changes: 11 additions & 5 deletions dev-packages/dev/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Eclipse GLSP - All-in-one dev package

A meta package that includes all shared configuration packages Eclipse GLSP components.
In addition, it also provides the GLSP CLI application
In addition, it also provides the GLSP CLI application.

The package is available via npm and can be used by all GLSP components implemented with Typescript.

Expand Down Expand Up @@ -38,6 +38,10 @@ yarn add --dev @eclipse-glsp/dev
}
```

In addition, a custom configuration for projects that use `mocha` is available:

- `@eclipse-glsp/ts-config/mocha`

### ESLint

**Create a `.eslintrc.js`**:
Expand All @@ -64,15 +68,15 @@ module.exports = {
}
```

**Or add a `.prettierrc.json` to the workspace root**:
**Or add a `.prettierrc` to the workspace root**:

```json
"@eclipse-glsp/prettier-config"
```

### Mocha

**Create a `.mocharc.json`**:
**Create a `.mocharc`**:

```json
{
Expand All @@ -83,10 +87,12 @@ module.exports = {

### Nyc

**Add a `.nycrc.json` to your project root**:
**Add a `.nycrc` to your project root**:

```json
"@eclipse-glsp/prettier-config"
{
"extends": "@eclipse-glsp/nyc-config"
}
```

Configuration can also be provided by `nyc.config.js` if programmed logic is required.
Expand Down
9 changes: 2 additions & 7 deletions dev-packages/eslint-config/configs/warnings.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ module.exports = {
'no-new-wrappers': 'warn',
'no-return-await': 'warn',
'no-redeclare': 'off',
'no-shadow': [
'warn',
{
hoist: 'all'
}
],
'no-shadow': 'off',
'no-multiple-empty-lines': [
'warn',
{
Expand Down Expand Up @@ -76,7 +71,7 @@ module.exports = {
'@typescript-eslint/type-annotation-spacing': 'warn',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-this-alias': 'off',

'@typescript-eslint/no-shadow': 'warn',
/// eslint-plugin-deprecation plugin
'import/no-deprecated': 'warn',
'deprecation/deprecation': 'warn'
Expand Down
1 change: 1 addition & 0 deletions dev-packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
],
"main": "index.js",
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"eslint": "^8.29.0",
"eslint-config-prettier": "^8.5.0",
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/mocha-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ yarn add --dev @eclipse-glsp/mocha-config

## Usage

**Create a `.mocharc.json`**:
**Create a `.mocharc` file **:

```json
{
Expand Down
7 changes: 3 additions & 4 deletions dev-packages/mocha-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@
".mocharc.json"
],
"peerDependencies": {
"ignore-styles": "^5.0.1",
"mocha": "^10.1.0",
"reflect-metadata": ">=0.1.13",
"ts-node": "^10.9.1"
"ignore-styles": "^5.0.0",
"mocha": "^10.0.0",
"reflect-metadata": "^0.1.0"
},
"publishConfig": {
"access": "public"
Expand Down
6 changes: 4 additions & 2 deletions dev-packages/nyc-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ yarn add --dev @eclipse-glsp/nyc-config

## Usage

**Add a `.nycrc.json` to your project root**:
**Add a `.nycrc` to your project root**:

```json
"@eclipse-glsp/nyc-config"
{
"extends": "@eclipse-glsp/nyc-config"
}
```

Configuration can also be provided by `nyc.config.js` if programmed logic is required.
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/prettier-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ yarn add --dev @eclipse-glsp/prettier-config
}
```

**Or add a `.prettierrc.json` to the workspace root**:
**Or add a `.prettierrc` to the workspace root**:

```json
"@eclipse-glsp/prettier-config"
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/prettier-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
],
"main": "index.json",
"dependencies": {
"prettier-plugin-packagejson": "^2.3.0"
"prettier-plugin-packagejson": "~2.4.3"
},
"publishConfig": {
"access": "public"
Expand Down
6 changes: 5 additions & 1 deletion dev-packages/ts-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@ yarn add --dev @eclipse-glsp/ts-config

```json
{
"extends": "@eclipse-glsp/ts-config/tsconfig.json",
"extends": "@eclipse-glsp/ts-config",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib"
}
}
```

In addition, a custom configuration for projects that use `mocha` is available:

- `@eclipse-glsp/ts-config/mocha`

## More information

For more information, please visit the [Eclipse GLSP Umbrella repository](https://github.com/eclipse-glsp/glsp) and the [Eclipse GLSP Website](https://www.eclipse.org/glsp/).
Expand Down
7 changes: 7 additions & 0 deletions dev-packages/ts-config/mocha.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "./tsconfig.json",
"compilerOptions": {
"types": ["node", "mocha", "reflect-metadata"]
},
}
7 changes: 4 additions & 3 deletions dev-packages/ts-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
"url": "https://projects.eclipse.org/projects/ecd.glsp"
}
],
"main": "tsconfig.json",
"main": "./tsconfig.json",
"files": [
"tsconfig.json"
"tsconfig.json",
"mocha.json"
],
"peerDependencies": {
"typescript": ">=4.9.3"
"typescript": ">=4.9.x"
},
"publishConfig": {
"access": "public"
Expand Down
3 changes: 2 additions & 1 deletion dev-packages/ts-config/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"skipLibCheck": true,
"declaration": true,
Expand All @@ -24,6 +25,6 @@
"jsx": "react",
"lib": ["ES2017", "dom"],
"sourceMap": true,
"types": ["node", "mocha", "reflect-metadata"]
"types": ["node", "reflect-metadata"]
}
}
Loading

0 comments on commit 11abc3d

Please sign in to comment.