diff --git a/.github/ncs-version.js b/.github/ncs-version.js new file mode 100644 index 00000000..960d7d7c --- /dev/null +++ b/.github/ncs-version.js @@ -0,0 +1,11 @@ +import fs from 'fs' +import yaml from 'js-yaml' +import path from 'path' + +const westYaml = yaml.load( + fs.readFileSync(path.join(process.cwd(), 'west.yml'), 'utf-8'), +) + +process.stdout.write( + westYaml.manifest.projects.find(({ name }) => name === 'sdk-nrf').revision, +) diff --git a/.github/ncs-version.mjs b/.github/ncs-version.mjs deleted file mode 100644 index 371fd6ce..00000000 --- a/.github/ncs-version.mjs +++ /dev/null @@ -1,11 +0,0 @@ -import fs from "fs"; -import yaml from "js-yaml"; -import path from "path"; - -const westYaml = yaml.load( - fs.readFileSync(path.join(process.cwd(), "west.yml"), "utf-8") -); - -process.stdout.write( - westYaml.manifest.projects.find(({ name }) => name === "sdk-nrf").revision -); diff --git a/.github/workflows/pr-check_compliance.yaml b/.github/workflows/pr-check_compliance.yaml index 54d805c6..847899b9 100644 --- a/.github/workflows/pr-check_compliance.yaml +++ b/.github/workflows/pr-check_compliance.yaml @@ -32,7 +32,7 @@ jobs: run: npm ci - name: Get NCS version id: version - run: echo "version=`node .github/ncs-version.mjs`" >> $GITHUB_OUTPUT + run: echo "version=`node .github/ncs-version.js`" >> $GITHUB_OUTPUT checkpatch: runs-on: ubuntu-22.04 needs: [ncs] diff --git a/.github/workflows/pr-clang-format.yaml b/.github/workflows/pr-clang-format.yaml index bd5a01f4..889c36f3 100644 --- a/.github/workflows/pr-clang-format.yaml +++ b/.github/workflows/pr-clang-format.yaml @@ -28,7 +28,7 @@ jobs: run: npm ci - name: Get NCS version id: version - run: echo "version=`node .github/ncs-version.mjs`" >> $GITHUB_OUTPUT + run: echo "version=`node .github/ncs-version.js`" >> $GITHUB_OUTPUT clang-format: runs-on: ubuntu-22.04 needs: [ncs] diff --git a/.github/workflows/update-from-ncs.yaml b/.github/workflows/update-from-ncs.yaml index ab92d3bd..436d60df 100644 --- a/.github/workflows/update-from-ncs.yaml +++ b/.github/workflows/update-from-ncs.yaml @@ -34,7 +34,7 @@ jobs: run: npm ci - name: Get NCS version id: version - run: echo "version=`node .github/ncs-version.mjs`" >> $GITHUB_OUTPUT + run: echo "version=`node .github/ncs-version.js`" >> $GITHUB_OUTPUT update: runs-on: ubuntu-22.04 needs: [ncs] diff --git a/.prettierignore b/.prettierignore index 3adb81d2..1f6ecb09 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,4 @@ package-lock.json src/ -child_image/ \ No newline at end of file +child_image/ +sample.yaml diff --git a/commitlint.config.cjs b/commitlint.config.cjs new file mode 100644 index 00000000..4fedde6d --- /dev/null +++ b/commitlint.config.cjs @@ -0,0 +1 @@ +module.exports = { extends: ['@commitlint/config-conventional'] } diff --git a/commitlint.config.js b/commitlint.config.js deleted file mode 100644 index 5073c20d..00000000 --- a/commitlint.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { extends: ["@commitlint/config-conventional"] }; diff --git a/package.json b/package.json index fc2414f5..ef88ce9b 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "@nordicsemiconductor/asset-tracker-cloud-firmware-aws", "version": "0.0.0-development", "description": "nRF Asset Tracker for AWS firmware.", + "type": "module", "repository": { "type": "git", "url": "https://github.com/NordicSemiconductor/asset-tracker-cloud-firmware-aws.git" @@ -29,7 +30,7 @@ }, "lint-staged": { "*.{yml,md,js,json}": [ - "prettier --write --config .prettierrc.js" + "prettier --write" ] }, "engines": { @@ -180,5 +181,6 @@ }, "cloud": { "repository": "https://github.com/NordicSemiconductor/asset-tracker-cloud-aws-js.git" - } + }, + "prettier": "@bifravst/prettier-config" }