diff --git a/.eslintrc.js b/.eslintrc.js index de9cde0f7..413e89b5d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,7 @@ const fbjs = require('eslint-config-fbjs'); // enforces copyright header and @format directive to be present in every file -const pattern = /^\*\n[\S\s]*Facebook[\S\s]* \* @format\n/; +const pattern = /^\*\r?\n[\S\s]*Facebook[\S\s]* \* @format\r?\n/; const prettierConfig = { requirePragma: true, diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 09ec7e7b4..af4b054e7 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -5,11 +5,12 @@ on: [push, pull_request] jobs: build: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: matrix: node-version: [10.x, 12.x] + os: ['ubuntu-latest', 'windows-latest'] steps: - uses: actions/checkout@v1 @@ -23,5 +24,9 @@ jobs: run: yarn lint - name: test run: yarn test - - name: build + - name: build linux + if: matrix.os == 'ubuntu-latest' run: yarn build --linux + - name: build windows + if: matrix.os == 'windows-latest' + run: yarn build --win diff --git a/src/utils/__tests__/jsonFileStorage.node.js b/src/utils/__tests__/jsonFileStorage.node.js index 658d55dd6..ba60cf8ea 100644 --- a/src/utils/__tests__/jsonFileStorage.node.js +++ b/src/utils/__tests__/jsonFileStorage.node.js @@ -13,6 +13,7 @@ import fs from 'fs'; const validSerializedData = fs .readFileSync('src/utils/__tests__/data/settings-v1-valid.json') .toString() + .replace(/\r\n/g, '\n') .trim(); const validDeserializedData =