diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f50aa101c3..620b54459ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,10 +21,10 @@ jobs: - "stable" - "nightly" node: - - "16" + - "20" include: # only enable coverage on the fastest job - - node: "16" + - node: "20" ENABLE_CODE_COVERAGE: true env: @@ -32,20 +32,20 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 2 - name: Setup Node.js ${{ matrix.node }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} cache: "npm" - name: Setup python3 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: "3.9" + python-version: "3.11" - run: pip install pynvim - name: Setup vim @@ -79,7 +79,7 @@ jobs: node --max-old-space-size=4096 --expose-gc ./node_modules/.bin/jest --maxWorkers=2 --coverage --forceExit - name: Codecov - uses: codecov/codecov-action@v3.1.1 + uses: codecov/codecov-action@v4 if: ${{ matrix.ENABLE_CODE_COVERAGE }} with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 42a300b82b3..7852a589ee9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,10 +15,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: cache: "npm" diff --git a/src/configuration/shape.ts b/src/configuration/shape.ts index c27a310b76c..c833cde06ed 100644 --- a/src/configuration/shape.ts +++ b/src/configuration/shape.ts @@ -34,7 +34,7 @@ export default class ConfigurationProxy implements IConfigurationShape { let dir = path.dirname(fsPath) let formattingOptions = { tabSize: 2, insertSpaces: true } if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true }) - let content = fs.readFileSync(fsPath, { encoding: 'utf8', flag: 'a+' }) + let content = fs.readFileSync(fsPath, { flag: 'a+' }).toString('utf8') content = content || '{}' let edits = modify(content, [key], value, { formattingOptions }) content = applyEdits(content, edits)