From c6a489cfd891387a65210a903e8cd652ac56974d Mon Sep 17 00:00:00 2001 From: Jack Westbrook Date: Thu, 28 Mar 2024 09:36:35 +0100 Subject: [PATCH] Chore: Bump Nx to 18.1.x (#85185) * chore: bump nx to latest version * build(plugin-configs): reduce wonky webpack output when logged via nx * revert(plugin-configs): remove infrastructureLogging property --- nx.json | 4 +- package.json | 2 +- .../grafana-plugin-configs/webpack.config.ts | 45 +++---- yarn.lock | 111 ++++++++++-------- 4 files changed, 84 insertions(+), 78 deletions(-) diff --git a/nx.json b/nx.json index 6e521df58c4..3ec7fc7711f 100644 --- a/nx.json +++ b/nx.json @@ -12,7 +12,5 @@ "outputs": ["{projectRoot}/dist"] } }, - "affected": { - "defaultBase": "main" - } + "defaultBase": "main" } diff --git a/package.json b/package.json index 895bbdcf963..710c706da91 100644 --- a/package.json +++ b/package.json @@ -197,7 +197,7 @@ "mutationobserver-shim": "0.3.7", "ngtemplate-loader": "2.1.0", "node-notifier": "10.0.1", - "nx": "18.0.8", + "nx": "18.1.3", "postcss": "8.4.38", "postcss-loader": "8.1.1", "postcss-reporter": "7.1.0", diff --git a/packages/grafana-plugin-configs/webpack.config.ts b/packages/grafana-plugin-configs/webpack.config.ts index 6722a506f70..0f851707350 100644 --- a/packages/grafana-plugin-configs/webpack.config.ts +++ b/packages/grafana-plugin-configs/webpack.config.ts @@ -2,8 +2,9 @@ import CopyWebpackPlugin from 'copy-webpack-plugin'; import ESLintPlugin from 'eslint-webpack-plugin'; import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin'; import path from 'path'; +// @ts-expect-error - there are no types for this package import ReplaceInFileWebpackPlugin from 'replace-in-file-webpack-plugin'; -import { Configuration, DefinePlugin } from 'webpack'; +import { Configuration } from 'webpack'; import { DIST_DIR } from './constants'; import { getPackageJson, getPluginJson, getEntries, hasLicense } from './utils'; @@ -185,27 +186,27 @@ const config = async (env: Record): Promise => { ], }, ]), - env.development - ? new ForkTsCheckerWebpackPlugin({ - async: true, - issue: { - include: [{ file: '**/*.{ts,tsx}' }], - }, - typescript: { configFile: path.join(process.cwd(), 'tsconfig.json') }, - }) - : new DefinePlugin({}), - env.development - ? new ESLintPlugin({ - extensions: ['.ts', '.tsx'], - lintDirtyModulesOnly: true, // don't lint on start, only lint changed files - cacheLocation: path.resolve( - __dirname, - '../../node_modules/.cache/eslint-webpack-plugin', - path.basename(process.cwd()), - '.eslintcache' - ), - }) - : new DefinePlugin({}), + ...(env.development + ? [ + new ForkTsCheckerWebpackPlugin({ + async: true, + issue: { + include: [{ file: '**/*.{ts,tsx}' }], + }, + typescript: { configFile: path.join(process.cwd(), 'tsconfig.json') }, + }), + new ESLintPlugin({ + extensions: ['.ts', '.tsx'], + lintDirtyModulesOnly: true, // don't lint on start, only lint changed files + cacheLocation: path.resolve( + __dirname, + '../../node_modules/.cache/eslint-webpack-plugin', + path.basename(process.cwd()), + '.eslintcache' + ), + }), + ] + : []), ], resolve: { diff --git a/yarn.lock b/yarn.lock index 29c14417bac..515ef6fb4ca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5483,15 +5483,15 @@ __metadata: languageName: node linkType: hard -"@nrwl/tao@npm:18.0.8": - version: 18.0.8 - resolution: "@nrwl/tao@npm:18.0.8" +"@nrwl/tao@npm:18.1.3": + version: 18.1.3 + resolution: "@nrwl/tao@npm:18.1.3" dependencies: - nx: "npm:18.0.8" + nx: "npm:18.1.3" tslib: "npm:^2.3.0" bin: tao: index.js - checksum: 10/136b855a496cbaa857a2341048178ef5e54f26a9de9edb314a8c7f6ca799c4c56d3eea83d72a94ae38c374b7cd0bec0f3745d67d05ffed36b43a1df5b4b54e45 + checksum: 10/338bf2cf323dc1accf252ce6650f182b8550948cf647005178679ed36ef8e5ec49ef11f20f249b83e1be671fac9f1b6c186662a4412a0c086068209de0afdd58 languageName: node linkType: hard @@ -5513,72 +5513,72 @@ __metadata: languageName: node linkType: hard -"@nx/nx-darwin-arm64@npm:18.0.8": - version: 18.0.8 - resolution: "@nx/nx-darwin-arm64@npm:18.0.8" +"@nx/nx-darwin-arm64@npm:18.1.3": + version: 18.1.3 + resolution: "@nx/nx-darwin-arm64@npm:18.1.3" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@nx/nx-darwin-x64@npm:18.0.8": - version: 18.0.8 - resolution: "@nx/nx-darwin-x64@npm:18.0.8" +"@nx/nx-darwin-x64@npm:18.1.3": + version: 18.1.3 + resolution: "@nx/nx-darwin-x64@npm:18.1.3" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@nx/nx-freebsd-x64@npm:18.0.8": - version: 18.0.8 - resolution: "@nx/nx-freebsd-x64@npm:18.0.8" +"@nx/nx-freebsd-x64@npm:18.1.3": + version: 18.1.3 + resolution: "@nx/nx-freebsd-x64@npm:18.1.3" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@nx/nx-linux-arm-gnueabihf@npm:18.0.8": - version: 18.0.8 - resolution: "@nx/nx-linux-arm-gnueabihf@npm:18.0.8" +"@nx/nx-linux-arm-gnueabihf@npm:18.1.3": + version: 18.1.3 + resolution: "@nx/nx-linux-arm-gnueabihf@npm:18.1.3" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@nx/nx-linux-arm64-gnu@npm:18.0.8": - version: 18.0.8 - resolution: "@nx/nx-linux-arm64-gnu@npm:18.0.8" +"@nx/nx-linux-arm64-gnu@npm:18.1.3": + version: 18.1.3 + resolution: "@nx/nx-linux-arm64-gnu@npm:18.1.3" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@nx/nx-linux-arm64-musl@npm:18.0.8": - version: 18.0.8 - resolution: "@nx/nx-linux-arm64-musl@npm:18.0.8" +"@nx/nx-linux-arm64-musl@npm:18.1.3": + version: 18.1.3 + resolution: "@nx/nx-linux-arm64-musl@npm:18.1.3" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@nx/nx-linux-x64-gnu@npm:18.0.8": - version: 18.0.8 - resolution: "@nx/nx-linux-x64-gnu@npm:18.0.8" +"@nx/nx-linux-x64-gnu@npm:18.1.3": + version: 18.1.3 + resolution: "@nx/nx-linux-x64-gnu@npm:18.1.3" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@nx/nx-linux-x64-musl@npm:18.0.8": - version: 18.0.8 - resolution: "@nx/nx-linux-x64-musl@npm:18.0.8" +"@nx/nx-linux-x64-musl@npm:18.1.3": + version: 18.1.3 + resolution: "@nx/nx-linux-x64-musl@npm:18.1.3" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@nx/nx-win32-arm64-msvc@npm:18.0.8": - version: 18.0.8 - resolution: "@nx/nx-win32-arm64-msvc@npm:18.0.8" +"@nx/nx-win32-arm64-msvc@npm:18.1.3": + version: 18.1.3 + resolution: "@nx/nx-win32-arm64-msvc@npm:18.1.3" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@nx/nx-win32-x64-msvc@npm:18.0.8": - version: 18.0.8 - resolution: "@nx/nx-win32-x64-msvc@npm:18.0.8" +"@nx/nx-win32-x64-msvc@npm:18.1.3": + version: 18.1.3 + resolution: "@nx/nx-win32-x64-msvc@npm:18.1.3" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -7026,13 +7026,20 @@ __metadata: languageName: node linkType: hard -"@remix-run/router@npm:1.14.2, @remix-run/router@npm:^1.5.0": +"@remix-run/router@npm:1.14.2": version: 1.14.2 resolution: "@remix-run/router@npm:1.14.2" checksum: 10/422844e88b985f1e287301b302c6cf8169c9eea792f80d40464f97b25393bb2e697228ebd7a7b61444d5a51c5873c4a637aad20acde5886a5caf62e833c5ceee languageName: node linkType: hard +"@remix-run/router@npm:^1.5.0": + version: 1.11.0 + resolution: "@remix-run/router@npm:1.11.0" + checksum: 10/629ec578b9dfd3c5cb5de64a0798dd7846ec5ba0351aa66f42b1c65efb43da8f30366be59b825303648965b0df55b638c110949b24ef94fd62e98117fdfb0c0f + languageName: node + linkType: hard + "@rollup/plugin-image@npm:3.0.3": version: 3.0.3 resolution: "@rollup/plugin-image@npm:3.0.3" @@ -18762,7 +18769,7 @@ __metadata: ngtemplate-loader: "npm:2.1.0" node-forge: "npm:^1.3.1" node-notifier: "npm:10.0.1" - nx: "npm:18.0.8" + nx: "npm:18.1.3" ol: "npm:7.4.0" ol-ext: "npm:4.0.17" papaparse: "npm:5.4.1" @@ -23825,21 +23832,21 @@ __metadata: languageName: node linkType: hard -"nx@npm:18.0.8, nx@npm:>=17.1.2 < 19": - version: 18.0.8 - resolution: "nx@npm:18.0.8" +"nx@npm:18.1.3, nx@npm:>=17.1.2 < 19": + version: 18.1.3 + resolution: "nx@npm:18.1.3" dependencies: - "@nrwl/tao": "npm:18.0.8" - "@nx/nx-darwin-arm64": "npm:18.0.8" - "@nx/nx-darwin-x64": "npm:18.0.8" - "@nx/nx-freebsd-x64": "npm:18.0.8" - "@nx/nx-linux-arm-gnueabihf": "npm:18.0.8" - "@nx/nx-linux-arm64-gnu": "npm:18.0.8" - "@nx/nx-linux-arm64-musl": "npm:18.0.8" - "@nx/nx-linux-x64-gnu": "npm:18.0.8" - "@nx/nx-linux-x64-musl": "npm:18.0.8" - "@nx/nx-win32-arm64-msvc": "npm:18.0.8" - "@nx/nx-win32-x64-msvc": "npm:18.0.8" + "@nrwl/tao": "npm:18.1.3" + "@nx/nx-darwin-arm64": "npm:18.1.3" + "@nx/nx-darwin-x64": "npm:18.1.3" + "@nx/nx-freebsd-x64": "npm:18.1.3" + "@nx/nx-linux-arm-gnueabihf": "npm:18.1.3" + "@nx/nx-linux-arm64-gnu": "npm:18.1.3" + "@nx/nx-linux-arm64-musl": "npm:18.1.3" + "@nx/nx-linux-x64-gnu": "npm:18.1.3" + "@nx/nx-linux-x64-musl": "npm:18.1.3" + "@nx/nx-win32-arm64-msvc": "npm:18.1.3" + "@nx/nx-win32-x64-msvc": "npm:18.1.3" "@yarnpkg/lockfile": "npm:^1.1.0" "@yarnpkg/parsers": "npm:3.0.0-rc.46" "@zkochan/js-yaml": "npm:0.0.6" @@ -23905,7 +23912,7 @@ __metadata: bin: nx: bin/nx.js nx-cloud: bin/nx-cloud.js - checksum: 10/f590a9a8d314161555c4a3d8fa7b2e57997eb7c3cd8d9639c24e735af23299850843898da1c682c08b6f60d1b9ab3e99e29b3caa8be8a3bd654419f427d7caa9 + checksum: 10/216b91cda546c949fb4cc64ee036d1510482ceb6668f6f157d5c25c47dae179e26792867b163a68ca735f90559dfb04f7c811c791ef4d26cdd8799c498fec880 languageName: node linkType: hard