Skip to content

Commit

Permalink
update std scripts and test environment
Browse files Browse the repository at this point in the history
  • Loading branch information
mcm1957 committed Oct 31, 2023
1 parent 8d5b739 commit 91f226c
Show file tree
Hide file tree
Showing 17 changed files with 114 additions and 83 deletions.
3 changes: 0 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
**/.eslintrc.js
admin/words.js
lib/**
gulpfile.js
main.js
20 changes: 10 additions & 10 deletions .github/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Configure here which dependency updates should be merged automatically.
# The recommended configuration is the following:
- match:
# Only merge patches for production dependencies
dependency_type: production
update_type: "semver:patch"
# Only merge patches for production dependencies
dependency_type: production
update_type: "semver:patch"
- match:
# Except for security fixes, here we allow minor patches
dependency_type: production
update_type: "security:minor"
# Except for security fixes, here we allow minor patches
dependency_type: production
update_type: "security:minor"
- match:
# and development dependencies can have a minor update, too
dependency_type: development
update_type: "semver:minor"
# and development dependencies can have a minor update, too
dependency_type: development
update_type: "semver:minor"

# The syntax is based on the legacy dependabot v1 automerged_updates syntax, see:
# https://dependabot.com/docs/config-file/#automerged_updates
# https://dependabot.com/docs/config-file/#automerged_updates
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 2version: 2
version: 2
updates:
- package-ecosystem: npm
directory: "/"
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Automatically merge Dependabot PRs when version comparison is within the range
# that is configured in .github/auto-merge.yml

name: Auto-Merge Dependabot PRs

on:
# WARNING: This needs to be run in the PR base, DO NOT build untrusted code in this action
# details under https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
pull_request_target:

jobs:
auto-merge:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Check if PR should be auto-merged
uses: ahmadnassri/action-dependabot-auto-merge@v2
with:
# In order to use this, you need to go to https://github.com/settings/tokens and
# create a Personal Access Token with the permission "public_repo".
# Enter this token in your repository settings under "Secrets" and name it AUTO_MERGE_TOKEN
github-token: ${{ secrets.AUTO_MERGE_TOKEN }}
# By default, squash and merge, so Github chooses nice commit messages
command: squash and merge
22 changes: 0 additions & 22 deletions .github/workflows/dependabot-automerge.yml

This file was deleted.

20 changes: 12 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
.git
.idea
.settings
# No dot-directories except github/vscode
.*/
!.vscode/
!.github/

*.code-workspace
node_modules
nbproject
admin/i18n/flat.txt
admin/i18n/*/flat.txt
/tmp/

# npm package files
iobroker.*.tgz

Thumbs.db

# ioBroker dev-server
.dev-server/
# i18n intermediate files
admin/i18n/flat.txt
admin/i18n/*/flat.txt
File renamed without changes.
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
package.json
package-lock.json
9 changes: 9 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
semi: true,
trailingComma: 'all',
singleQuote: true,
printWidth: 120,
useTabs: false,
tabWidth: 4,
endOfLine: 'lf',
};
2 changes: 1 addition & 1 deletion .releaseconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"plugins": ["iobroker", "license"]
"plugins": ["iobroker", "license", "manual-review"]
}
42 changes: 25 additions & 17 deletions io-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
"zh-cn": "允许设置默认的shuffle值\n轨道类型未更正"
}
},
"title": "Spotify (Premium)",
"titleLang": {
"en": "Spotify (Premium)",
"de": "Spotify (Premium)",
Expand All @@ -99,6 +98,7 @@
"it": "Spotify (Premium)",
"es": "Spotify (premium)",
"pl": "Spotify (Premium)",
"uk": "Spotify (Premium)",
"zh-cn": "Spotify(高级)"
},
"desc": {
Expand All @@ -111,42 +111,50 @@
"it": "controllare i dispositivi spotify",
"es": "controlar dispositivos spotify",
"pl": "kontroluj urządzenia spotify",
"uk": "управління точністю пристроїв",
"zh-cn": "控制spotify设备"
},
"authors": [
"Lucky",
"Alexander Kose"
"Alexander Kose",
"iobroker-community-adapters <[email protected]>"
],
"keywords": [
"spotify",
"player",
"media"
],
"license": "MIT",
"platform": "Javascript/Node.js",
"mode": "daemon",
"main": "main.js",
"icon": "spotify-premium.png",
"materialize": true,
"enabled": true,
"extIcon": "https://raw.githubusercontent.com/iobroker-community-adapters/ioBroker.spotify-premium/master/admin/spotify-premium.png",
"keywords": [
"spotify",
"player",
"media"
],
"readme": "https://github.com/iobroker-community-adapters/ioBroker.spotify-premium/blob/master/README.md",
"loglevel": "info",
"mode": "daemon",
"type": "multimedia",
"compact": true,
"connectionType": "cloud",
"dataSource": "poll",
"materialize": true,
"tier": 2,
"dependencies": [
{
"js-controller": ">=4.0.24"
}
],
"globalDependencies": [
{
"admin": ">=5.1.13"
}
],
"plugins": {
"sentry": {
"dsn": "https://[email protected]/195"
"sentry": {
"dsn": "https://[email protected]/195"
}
}
},
"dependencies": [
{
"js-controller": ">=2.0.0"
}
]
},
"native": {
"client_id": "",
"client_secret": "",
Expand Down
28 changes: 15 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
"email": "[email protected]"
},
"contributors": [
{
"name": "iobroker-community-adapters",
"email": "[email protected]"
},
{
"name": "Lucky"
},
Expand Down Expand Up @@ -39,27 +43,25 @@
"@alcalzone/release-script-plugin-iobroker": "^3.6.0",
"@alcalzone/release-script-plugin-license": "^3.5.9",
"@alcalzone/release-script-plugin-manual-review": "^3.5.9",
"axios": "^1.6.0",
"gulp": "^4.0.2",
"@iobroker/adapter-dev": "^1.2.0",
"@iobroker/testing": "^4.1.0",
"@tsconfig/node14": "^14.1.0",
"@types/chai": "^4.3.9",
"@types/chai-as-promised": "^7.1.7",
"@types/mocha": "^10.0.3",
"@types/node": "^20.8.9",
"@types/proxyquire": "^1.3.30",
"@types/sinon": "^10.0.19",
"@types/sinon-chai": "^3.2.11",
"@types/chai": "^4.3.8",
"@types/chai-as-promised": "^7.1.6",
"@types/mocha": "^10.0.2",
"@types/node": "^20.8.6",
"@types/proxyquire": "^1.3.29",
"@types/sinon": "^10.0.16",
"@types/sinon-chai": "^3.2.10",
"chai": "^4.3.10",
"chai-as-promised": "^7.1.1",
"eslint": "^8.52.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint": "^8.51.0",
"eslint-config-prettier": "^8.9.0",
"eslint-plugin-prettier": "^4.2.1",
"mocha": "^10.2.0",
"prettier": "^3.0.3",
"proxyquire": "^2.1.3",
"sinon": "^16.1.0",
"sinon": "^15.2.0",
"sinon-chai": "^3.7.0",
"typescript": "~5.2.2"
},
Expand Down
2 changes: 0 additions & 2 deletions test/mocha.custom.opts

This file was deleted.

2 changes: 1 addition & 1 deletion test/mocha.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ const { should, use } = require('chai');

should();
use(sinonChai);
use(chaiAsPromised);
use(chaiAsPromised);
4 changes: 4 additions & 0 deletions test/mocharc.custom.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"require": ["test/mocha.setup.js"],
"watch-files": ["!(node_modules|test)/**/*.test.js", "*.test.js", "test/**/test!(PackageFiles|Startup).js"]
}
7 changes: 7 additions & 0 deletions test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"noImplicitAny": false
},
"include": ["./**/*.js"]
}
5 changes: 0 additions & 5 deletions test/unit.js

This file was deleted.

0 comments on commit 91f226c

Please sign in to comment.