Skip to content

Commit 1692243

Browse files
authored
Merge branch 'master' into logging-exMTL
2 parents 7fd3dd2 + 7a8a817 commit 1692243

File tree

24 files changed

+5244
-3082
lines changed

24 files changed

+5244
-3082
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2-
31
version: 2
42
updates:
5-
# Intentionally not adding automatic NPM updates because I do
6-
# not trust the plugin's tests to catch issues caused by updates.
7-
# TODO or enable, but avoid merging without first doing a local interactive test?
83
- package-ecosystem: "maven"
94
directory: "/"
105
schedule:
@@ -19,3 +14,13 @@ updates:
1914
directory: "/plugin"
2015
schedule:
2116
interval: "weekly"
17+
groups:
18+
javascript-production:
19+
applies-to: version-updates
20+
dependency-type: production
21+
javascript-development:
22+
applies-to: version-updates
23+
dependency-type: development
24+
javascript-security:
25+
applies-to: security-updates
26+
dependency-type: production

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ target
22
work
33
node
44
node_modules
5+
.yarn/
56
.idea/
67
*.iml
78
.classpath

lib/src/main/java/com/cloudbees/groovy/cps/SerializableScript.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.cloudbees.groovy.cps;
22

3+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
4+
35
import groovy.lang.Binding;
46
import groovy.lang.Script;
57

@@ -26,6 +28,7 @@ private void writeObject(ObjectOutputStream oos) throws IOException {
2628
oos.writeObject(getBinding().getVariables());
2729
}
2830

31+
@SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_READ_OBJECT", justification = "TODO needs triage")
2932
private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
3033
Map m = (Map)ois.readObject();
3134
getBinding().getVariables().putAll(m);

lib/src/main/java/com/cloudbees/groovy/cps/impl/FunctionCallBlock.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import com.cloudbees.groovy.cps.Next;
88
import com.cloudbees.groovy.cps.sandbox.CallSiteTag;
99

10-
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
1110
import java.util.ArrayList;
1211
import java.util.Arrays;
1312
import java.util.Collection;
@@ -42,7 +41,6 @@ public class FunctionCallBlock extends CallSiteBlockSupport {
4241

4342
private final boolean safe;
4443

45-
@SuppressFBWarnings(value = "EI_EXPOSE_REP2", justification = "Block array is constructed during compilation, is not mutated, and is never exposed")
4644
public FunctionCallBlock(SourceLocation loc, Collection<CallSiteTag> tags, Block lhsExp, Block nameExp, boolean safe, Block[] argExps) {
4745
super(tags);
4846
this.loc = loc;

plugin/.eslintignore

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

plugin/.eslintrc.js

Lines changed: 0 additions & 20 deletions
This file was deleted.
File renamed without changes.

plugin/.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

plugin/eslint.config.mjs

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import { defineConfig, globalIgnores } from "eslint/config";
2+
import globals from "globals";
3+
import path from "node:path";
4+
import { fileURLToPath } from "node:url";
5+
import js from "@eslint/js";
6+
import { FlatCompat } from "@eslint/eslintrc";
7+
8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = path.dirname(__filename);
10+
const compat = new FlatCompat({
11+
baseDirectory: __dirname,
12+
recommendedConfig: js.configs.recommended,
13+
allConfig: js.configs.all
14+
});
15+
16+
export default defineConfig([globalIgnores([
17+
"**/work",
18+
"**/target",
19+
"rebel.xml",
20+
"**/node/",
21+
"**/node_modules/",
22+
"**/jsbundles",
23+
"src/main/webapp/css/*",
24+
"src/main/webapp/icons/*",
25+
]), {
26+
extends: compat.extends("eslint:recommended"),
27+
28+
languageOptions: {
29+
globals: {
30+
...globals.browser,
31+
},
32+
33+
ecmaVersion: 2022,
34+
sourceType: "module",
35+
},
36+
37+
rules: {
38+
curly: "error",
39+
},
40+
}]);

plugin/package.json

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,43 +10,50 @@
1010
"prod": "webpack --config webpack.prod.js",
1111
"start": "yarn dev --watch",
1212
"lint:js": "eslint src/main/js --ext js",
13+
"lint:js-ci": "eslint src/main/js -f checkstyle -o target/eslint-warnings.xml --ext js",
1314
"mvnbuild": "yarn prod",
14-
"mvntest": "yarn lint:js"
15+
"mvntest": "if-env CI=true && yarn lint:js-ci || yarn lint:js"
1516
},
1617
"repository": {
1718
"type": "git",
1819
"url": "https://github.com/jenkinsci/workflow-cps-plugin"
1920
},
2021
"readme": "../README.md",
2122
"devDependencies": {
22-
"@babel/cli": "^7.19.3",
23-
"@babel/core": "^7.19.3",
24-
"@babel/preset-env": "^7.19.3",
25-
"autoprefixer": "^10.4.13",
26-
"babel-loader": "^9.0.1",
23+
"@babel/cli": "^7.27.0",
24+
"@babel/core": "^7.26.10",
25+
"@babel/preset-env": "^7.26.9",
26+
"@delucis/if-env": "^1.1.2",
27+
"@eslint/eslintrc": "^3.3.1",
28+
"@eslint/js": "^9.24.0",
29+
"autoprefixer": "^10.4.21",
30+
"babel-loader": "^10.0.0",
2731
"clean-webpack-plugin": "^4.0.0",
28-
"css-loader": "^5.0.0",
29-
"eslint": "^8.41.0",
32+
"css-loader": "^7.1.2",
33+
"eslint": "^9.24.0",
34+
"eslint-formatter-checkstyle": "^8.40.0",
3035
"eslint-plugin-only-warn": "^1.1.0",
31-
"less": "^3.12.2",
32-
"less-loader": "^7.0.2",
33-
"mini-css-extract-plugin": "^1.2.1",
36+
"globals": "^16.0.0",
37+
"less": "^4.3.0",
38+
"less-loader": "^12.2.0",
39+
"mini-css-extract-plugin": "^2.9.2",
3440
"postcss": "^8.4.35",
35-
"postcss-less": "^4.0.0",
36-
"postcss-loader": "^4.0.4",
37-
"style-loader": "^2.0.0",
38-
"webpack": "^5.76.3",
39-
"webpack-cli": "^5.0.1",
41+
"postcss-less": "^6.0.0",
42+
"postcss-loader": "^8.1.1",
43+
"style-loader": "^4.0.0",
44+
"webpack": "^5.99.5",
45+
"webpack-cli": "^6.0.1",
4046
"webpack-fix-style-only-entries": "^0.6.1",
41-
"webpack-merge": "^5.8.0"
47+
"webpack-merge": "^6.0.1"
4248
},
4349
"dependencies": {
44-
"ace-builds": "^1.15.0",
45-
"jquery": "^3.6.1",
46-
"jquery-ui": "^1.13.2"
50+
"ace-builds": "^1.40.0",
51+
"jquery": "^3.7.1",
52+
"jquery-ui": "^1.14.1"
4753
},
4854
"browserslist": [
4955
"defaults",
5056
"not IE 11"
51-
]
57+
],
58+
"packageManager": "[email protected]"
5259
}

0 commit comments

Comments
 (0)