Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: arduino/arduino-iot-js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.4.1
Choose a base ref
...
head repository: arduino/arduino-iot-js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
19 changes: 0 additions & 19 deletions .babelrc

This file was deleted.

12 changes: 0 additions & 12 deletions .editorconfig

This file was deleted.

34 changes: 26 additions & 8 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
module.exports = {
"extends": "airbnb-base",
"env": {
"browser": true,
"jest": true
},
"rules": {
"no-await-in-loop": 0
}
env: {
es6: true,
},
ignorePatterns: ['node_modules/*', 'lib/*', 'es/*'],
parser: '@typescript-eslint/parser',
extends: [
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
],
parserOptions: {
sourceType: 'module',
project: './tsconfig.json',
ecmaVersion: 2018,
},
rules: {
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/no-use-before-define': 'warn',
'@typescript-eslint/camelcase': 'warn',
'@typescript-eslint/no-empty-interface': 'warn',
'@typescript-eslint/no-empty-function': 'warn',
'@typescript-eslint/no-namespace': 'warn',
'prefer-rest-params': 'warn',
'no-else-return': 'error',
},
};
34 changes: 34 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release Lib

on:
push:
tags:
- '*'

jobs:
test:
runs-on: ubuntu-latest
env:
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}

steps:
- name: Disable EOL conversions
run: git config --global core.autocrlf false

- name: Checkout
uses: actions/checkout@master

- name: Integration tests
uses: actions/setup-node@v1
with:
node-version: '12'

- run: npm install
- run: npm run lint
- run: npm run test
env:
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}

- run: npm run build
- run: npm publish
31 changes: 31 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "[PR] Run Tests"

on:
pull_request:
types: [opened, synchronize, ready_for_review, reopened]
push:
branches:
- master

jobs:
test:
runs-on: ubuntu-latest
env:
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
steps:
- name: Disable EOL conversions
run: git config --global core.autocrlf false

- name: Checkout
uses: actions/checkout@master

- name: Integration tests
uses: actions/setup-node@v1
with:
node-version: '16'
- run: npm install
- run: npm run lint
- run: npm run test
env:
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
64 changes: 64 additions & 0 deletions .github/workflows/verify-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: "[PR] Verify App Version"

on:
pull_request:
types: [opened, synchronize, ready_for_review, reopened]

jobs:
get-current-version:
name: Get Current Version
runs-on: ubuntu-latest
if: ${{ github.base_ref == 'master' }}
outputs:
version: ${{ steps.get_version.outputs.version }}
steps:
- uses: actions/checkout@v1

- id: get_version
name: Get version
run: |
version=$(node -p 'require("./package.json").version')
echo "::set-output name=version::${version}"
get-master-version:
name: Get Master Version
runs-on: ubuntu-latest
if: ${{ github.base_ref == 'master' }}
outputs:
version: ${{ steps.get_version.outputs.version }}
steps:
- uses: actions/checkout@v1
with:
ref: master

- id: get_version
name: Get version
run: |
version=$(node -p 'require("./package.json").version')
echo "::set-output name=version::${version}"
verify:
name: Verify versions
if: ${{ github.base_ref == 'master' }}
needs: [get-current-version, get-master-version]
runs-on: ubuntu-latest
steps:
- id: verify_versions
name: Verify versions
shell: bash
run: |
verlte() {
[ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]
}
verlt() {
[ "$1" = "$2" ] && return 1 || verlte $1 $2
}
if verlt ${{ needs.get-master-version.outputs.version }} ${{ needs.get-current-version.outputs.version }} ; then
echo 'Version is ok!'
else
echo 'Must bump app version' && exit 1
fi
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -2,4 +2,5 @@ node_modules
lib
dist
es
.tmp
.tmp
misc
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//registry.npmjs.org/:_authToken=${REPO_ACCESS_TOKEN}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.15.0
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"printWidth": 120,
"singleQuote": true,
"trailingComma": "es5"
}
4 changes: 2 additions & 2 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
This file includes licensing information for arduino-iot-js.

Copyright (c) 2018
Authors: Fabrizio Mirabito
Copyright (c) 2023
Authors: Fabrizio Mirabito, Francesco Pirrotta

The software is released under the GNU General Public License, which covers the main body
of the [insert app name] code. The terms of this license can be found at:
Loading