Skip to content

Commit 8bce1a0

Browse files
authored
Merge pull request #69 from gchq/release/v1.0.0-beta
Release/v1.0.0 beta
2 parents 1142e60 + 8cecd0e commit 8bce1a0

File tree

21 files changed

+2443
-6848
lines changed

21 files changed

+2443
-6848
lines changed

.eslintrc.json

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

.github/workflows/publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
node-version: [10.x, 12.x]
15+
node-version: [18.x, 20.x]
1616

1717
steps:
1818
- uses: actions/checkout@v2

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
node-version: [10.x, 12.x]
15+
node-version: [18.x, 20.x]
1616

1717
steps:
1818
- uses: actions/checkout@v1

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Changelog
2+
3+
## Versioning
4+
5+
CyberChef Server uses the [semver](https://semver.org/) system to manage versioning: `<MAJOR>.<MINOR>.<PATCH>`.
6+
7+
- MAJOR version changes represent a significant change to the fundamental architecture of CyberChef and may (but don't always) make breaking changes that are not backwards compatible.
8+
- MINOR version changes usually mean the addition of new operations or reasonably significant new features.
9+
- PATCH versions are used for bug fixes and any other small tweaks that modify or improve existing capabilities.
10+
11+
All major and minor version changes will be documented in this file. Details of patch-level version changes can be found in [commit messages](https://github.com/gchq/CyberChef-server/commits/master).
12+
13+
14+
## Details
15+
16+
### [1.0.0-beta] - 2024-10-04
17+
- CyberChef functionality brought in line with the mainline release
18+
- Upgraded to use ESM modules throughout
19+
- Works with recent versions of NodeJS
20+
- Re-orged the codebase slightly and slimmed down/updated some dependencies
21+
- Upgraded the base Docker image to Node 18

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:alpine3.10
1+
FROM node:18.20.4-alpine
22
LABEL author "Wes Lambert, [email protected]"
33
LABEL description="Dockerised version of Cyberchef server (https://github.com/gchq/CyberChef-server)"
44
LABEL copyright "Crown Copyright 2020"

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ After using [CyberChef](https://gchq.github.io/CyberChef/) to experiment and fin
3030

3131

3232
## Installing
33+
While the instructions below are straightforward, it's worth understanding what happens under the hood as quirks in the installation process can cause issues with upgrades etc. The upstream CyberChef library uses a postinstall script to manipulate some dependenciesafter installation. That postinstal script doesn't work when install CC as a dependency into another project, so we now have our own postinstall process to install the CyberChef library (hence it does not appear in the package.json dependency list).
34+
35+
This process can cause problems when updating libs, so the recommended approach is to remove node_modules and package-lock.json and install from scratch.
36+
3337
- Clone the repository
3438
- `cd` into the project and run `npm install`
3539
- Run `npm run`

bin/www

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

eslint.config.mjs

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
import globals from "globals";
2+
import path from "node:path";
3+
import { fileURLToPath } from "node:url";
4+
import js from "@eslint/js";
5+
import { FlatCompat } from "@eslint/eslintrc";
6+
7+
const __filename = fileURLToPath(import.meta.url);
8+
const __dirname = path.dirname(__filename);
9+
const compat = new FlatCompat({
10+
baseDirectory: __dirname,
11+
recommendedConfig: js.configs.recommended,
12+
allConfig: js.configs.all
13+
});
14+
15+
export default [...compat.extends("eslint:recommended"), {
16+
languageOptions: {
17+
globals: {
18+
...globals.node,
19+
it: false,
20+
describe: false,
21+
},
22+
23+
ecmaVersion: 2020,
24+
sourceType: "module",
25+
26+
parserOptions: {
27+
ecmaFeatures: {
28+
impliedStrict: true,
29+
},
30+
31+
allowImportExportEverywhere: true,
32+
},
33+
},
34+
35+
rules: {
36+
"no-eval": "error",
37+
"no-implied-eval": "error",
38+
"dot-notation": "error",
39+
eqeqeq: ["error", "smart"],
40+
"no-caller": "error",
41+
"no-extra-bind": "error",
42+
"no-unused-expressions": "error",
43+
"no-useless-call": "error",
44+
"no-useless-return": "error",
45+
radix: "warn",
46+
47+
"no-unused-vars": ["error", {
48+
args: "none",
49+
vars: "all",
50+
}],
51+
52+
"no-empty": ["error", {
53+
allowEmptyCatch: true,
54+
}],
55+
56+
"no-control-regex": "off",
57+
"require-atomic-updates": "off",
58+
"no-async-promise-executor": "off",
59+
"brace-style": ["error", "1tbs"],
60+
"block-spacing": "error",
61+
"array-bracket-spacing": "error",
62+
"comma-spacing": "error",
63+
"comma-style": "error",
64+
"computed-property-spacing": "error",
65+
"no-trailing-spaces": "warn",
66+
"eol-last": "error",
67+
"func-call-spacing": "error",
68+
69+
"key-spacing": ["warn", {
70+
mode: "minimum",
71+
}],
72+
73+
indent: ["error", 4, {
74+
ignoreComments: true,
75+
ArrayExpression: "first",
76+
SwitchCase: 1,
77+
}],
78+
79+
"linebreak-style": ["error", "unix"],
80+
81+
quotes: ["error", "double", {
82+
avoidEscape: true,
83+
}],
84+
85+
camelcase: ["error", {
86+
properties: "always",
87+
}],
88+
89+
semi: ["error", "always"],
90+
"unicode-bom": "error",
91+
92+
"keyword-spacing": ["error", {
93+
before: true,
94+
after: true,
95+
}],
96+
97+
"no-multiple-empty-lines": ["warn", {
98+
max: 2,
99+
maxEOF: 1,
100+
maxBOF: 0,
101+
}],
102+
103+
"no-whitespace-before-property": "error",
104+
"operator-linebreak": ["error", "after"],
105+
"space-in-parens": "error",
106+
"no-var": "error",
107+
"prefer-const": "error",
108+
},
109+
}, {
110+
files: ["test/**/*"],
111+
112+
rules: {
113+
"no-unused-expressions": "off",
114+
"no-console": "off",
115+
},
116+
}];

index.js

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

index.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import app from "./src/app.mjs";
2+
3+
4+
const port = process.env.PORT || 3000;
5+
6+
app.listen(port, function () {
7+
console.log(`CyberChef Server listening on port ${port}!`);
8+
});

0 commit comments

Comments
 (0)