Skip to content

Commit 6b10f61

Browse files
committed
Moved postinstall script to a Grunt task to fix relative calls. npm scripts now use local grunt install.
1 parent 83f119f commit 6b10f61

File tree

6 files changed

+21
-17
lines changed

6 files changed

+21
-17
lines changed

.eslintrc.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@
6363
}],
6464
"linebreak-style": ["error", "unix"],
6565
"quotes": ["error", "double", {
66-
"avoidEscape": true
66+
"avoidEscape": true,
67+
"allowTemplateLiterals": true
6768
}],
6869
"camelcase": ["error", {
6970
"properties": "always"

.github/workflows/releases.yml

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ jobs:
4747
tag: ${{ github.ref }}
4848
overwrite: true
4949
file_glob: true
50+
body: "See the [CHANGELOG](https://github.com/gchq/CyberChef/blob/master/CHANGELOG.md) and [commit messages](https://github.com/gchq/CyberChef/commits/master) for details."
5051

5152
- name: Publish to NPM
5253
if: success()

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Versioning
44

5-
CyberChef uses the [semver](https://semver.org/) system to manage versioning: MAJOR.MINOR.PATCH.
5+
CyberChef uses the [semver](https://semver.org/) system to manage versioning: `<MAJOR>.<MINOR>.<PATCH>`.
66

77
- 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.
88
- MINOR version changes usually mean the addition of new operations or reasonably significant new features.

Gruntfile.js

+10
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,16 @@ module.exports = function (grunt) {
411411
]),
412412
stdout: false,
413413
},
414+
fixCryptoApiImports: {
415+
command: [
416+
`[[ "$OSTYPE" == "darwin"* ]]`,
417+
"&&",
418+
`find ./node_modules/crypto-api/src/ \\( -type d -name .git -prune \\) -o -type f -print0 | xargs -0 sed -i '' -e '/\\.mjs/!s/\\(from "\\.[^"]*\\)";/\\1.mjs";/g'`,
419+
"||",
420+
`find ./node_modules/crypto-api/src/ \\( -type d -name .git -prune \\) -o -type f -print0 | xargs -0 sed -i -e '/\\.mjs/!s/\\(from "\\.[^"]*\\)";/\\1.mjs";/g'`
421+
].join(" "),
422+
stdout: false
423+
}
414424
},
415425
});
416426
};

package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -164,15 +164,15 @@
164164
"zlibjs": "^0.3.1"
165165
},
166166
"scripts": {
167-
"start": "grunt dev",
168-
"build": "grunt prod",
167+
"start": "npx grunt dev",
168+
"build": "npx grunt prod",
169169
"repl": "node src/node/repl.js",
170-
"test": "grunt configTests && node --experimental-modules --no-warnings --no-deprecation tests/node/index.mjs && node --experimental-modules --no-warnings --no-deprecation tests/operations/index.mjs",
171-
"test-node-consumer": "grunt testnodeconsumer",
172-
"testui": "grunt testui",
170+
"test": "npx grunt configTests && node --experimental-modules --no-warnings --no-deprecation tests/node/index.mjs && node --experimental-modules --no-warnings --no-deprecation tests/operations/index.mjs",
171+
"test-node-consumer": "npx grunt testnodeconsumer",
172+
"testui": "npx grunt testui",
173173
"testuidev": "npx nightwatch --env=dev",
174-
"lint": "grunt lint",
175-
"postinstall": "bash postinstall.sh",
174+
"lint": "npx grunt lint",
175+
"postinstall": "npx grunt exec:fixCryptoApiImports",
176176
"newop": "node --experimental-modules src/core/config/scripts/newOperation.mjs"
177177
}
178178
}

postinstall.sh

-8
This file was deleted.

0 commit comments

Comments
 (0)