Skip to content

Commit

Permalink
Merge pull request #3 from enell/alpha
Browse files Browse the repository at this point in the history
First release
  • Loading branch information
enell authored Dec 26, 2022
2 parents bd5d8a6 + 2a9c2af commit bc83c5e
Show file tree
Hide file tree
Showing 284 changed files with 2,083 additions and 3,982 deletions.
11 changes: 6 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
module.exports = {
env: {
browser: true,
commonjs: true,
es2021: true,
'jest/globals': true,
},
extends: 'standard-with-typescript',
overrides: [],
extends: ['eslint:recommended', 'plugin:prettier/recommended'],
plugins: ['jest'],
parserOptions: {
ecmaVersion: 'latest',
},
rules: {},
ecmaVersion: 'latest'
}
}
8 changes: 2 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ name: Release
on:
workflow_dispatch:
push:
branches:
- master
- alpha
- beta
jobs:
release:
name: Release
Expand All @@ -19,10 +15,10 @@ jobs:
with:
node-version: "lts/*"
flags: "--immutable-cache"
- name: Lint
run: yarn run lint
- name: Test
run: yarn run test
- name: Build
run: yarn run build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
7 changes: 7 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
trailingComma: 'es5',
tabWidth: 2,
semi: false,
singleQuote: true,
printWidth: 120,
};
23 changes: 23 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"configurations": [
{
"type": "node",
"name": "vscode-jest-tests.v2",
"request": "launch",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"cwd": "${workspaceFolder}",
"runtimeExecutable": "yarn",
"args": [
"test",
"--runInBand",
"--watchAll=false",
"--testNamePattern",
"${jest.testNamePattern}",
"--runTestsByPath",
"${jest.testFile}"
]
}
]
}
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"**/.pnp.*": true
},
"eslint.nodePath": ".yarn/sdks",
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
"jest.jestCommandLine": "yarn test",
"typescript.format.enable": false
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/arg-npm-4.1.3-1748b966a8-544af8dd3f.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/yn-npm-3.1.1-8ad4259784-2c487b0e14.zip
Binary file not shown.
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
yarnPath: .yarn/releases/yarn-3.3.0.cjs
nodeLinker: node-modules
3 changes: 0 additions & 3 deletions babel.config.js

This file was deleted.

6 changes: 6 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
verbose: true,
collectCoverage: true,
collectCoverageFrom: ['./src/**'],
coverageThreshold: { global: { lines: 90 } },
}
10 changes: 0 additions & 10 deletions jest.config.ts

This file was deleted.

49 changes: 14 additions & 35 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@enell/node-red-contrib-battery-optimizer",
"name": "node-red-contrib-genetic-charging-strategy",
"version": "0.0.0-development",
"description": "A module for Node-RED that adds a battery charging strategy to node-red-contrib-power-saver",
"description": "A module for Node-RED that adds a battery charging strategy to node-red-contrib-power-saver. It uses genetic algorithms to find the best schedule",
"main": "dist/main.js",
"type": "commonjs",
"keywords": [
Expand All @@ -15,63 +15,42 @@
"powersaver"
],
"scripts": {
"test": "jest test/*.ts",
"tsc": "tsc",
"lint": "eslint --fix",
"build": "webpack --progress --profile --color",
"test": "jest test/*.test.js",
"lint": "eslint --fix *.js src/*.js test/*.js",
"release": "semantic-release"
},
"author": "Johan Enell<[email protected]>",
"license": "MIT",
"prettier": {
"trailingComma": "es5",
"tabWidth": 2,
"semi": false,
"singleQuote": true,
"printWidth": 120
},
"files": [
"dist/strategy-battery-charging.js",
"dist/strategy-battery-charging.html",
"src/*",
"./package.json"
],
"node-red": {
"nodes": {
"enell-strategy-battery-charging": "dist/strategy-battery-charging.js"
"enell-strategy-genetic-charging": "src/strategy-battery-charging.js"
},
"version": ">=2.2.0"
},
"dependencies": {
"geneticalgorithm": "^1.0.2"
},
"devDependencies": {
"@babel/core": "^7.20.5",
"@babel/preset-env": "^7.20.2",
"@babel/preset-typescript": "^7.18.6",
"@jest/globals": "^29.3.1",
"@types/jest": "^29.2.4",
"@types/node": "^18.11.11",
"@types/node-red": "^1.2.1",
"@types/node-red-node-test-helper": "^0.2.2",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.45.1",
"@yarnpkg/pnpify": "^4.0.0-rc.32",
"babel-jest": "^29.3.1",
"copy-webpack-plugin": "^11.0.0",
"eslint": "^8.29.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest": "^27.1.6",
"eslint-plugin-prettier": "^4.2.1",
"jest": "^29.3.1",
"jest-mock-random": "^1.1.1",
"node-red": "^3.0.2",
"node-red-node-test-helper": "^0.3.0",
"semantic-release": "^19.0.5",
"ts-jest": "^29.0.3",
"ts-loader": "^9.4.2",
"ts-node": "^10.9.1",
"typescript": "^4.9.3",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1"
"prettier": "^2.8.1",
"semantic-release": "^19.0.5"
},
"packageManager": "[email protected]",
"repository": {
"type": "git",
"url": "https://github.com/enell/node-red-contrib-strategy-batery.git"
"url": "https://github.com/enell/node-red-contrib-genetic-charging-scheduler.git"
}
}
4 changes: 2 additions & 2 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{
}
// {
// }
2 changes: 0 additions & 2 deletions src/geneticalgorithm.d.ts

This file was deleted.

Loading

0 comments on commit bc83c5e

Please sign in to comment.