From 446e4bcf0ae4775077f9810952263277b4350770 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Tue, 29 Dec 2020 17:14:48 -0600 Subject: [PATCH 1/2] fix: update uuid to v8 --- lib/grammar-utils.js | 4 ++-- lib/grammar-utils/d.js | 4 ++-- lib/grammar-utils/matlab.js | 4 ++-- package.json | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/grammar-utils.js b/lib/grammar-utils.js index 07f05425..498d8c18 100644 --- a/lib/grammar-utils.js +++ b/lib/grammar-utils.js @@ -4,7 +4,7 @@ import os from 'os'; import fs from 'fs'; import path from 'path'; -import uuid from 'uuid'; +import { v1 as uuidv1 } from 'uuid'; // Public: GrammarUtils - utilities for determining how to run code export default { @@ -21,7 +21,7 @@ export default { fs.mkdirSync(this.tempFilesDir); } - const tempFilePath = this.tempFilesDir + path.sep + uuid.v1() + extension; + const tempFilePath = this.tempFilesDir + path.sep + uuidv1() + extension; const file = fs.openSync(tempFilePath, 'w'); fs.writeSync(file, code); diff --git a/lib/grammar-utils/d.js b/lib/grammar-utils/d.js index 6d4adea3..b8316e23 100644 --- a/lib/grammar-utils/d.js +++ b/lib/grammar-utils/d.js @@ -4,7 +4,7 @@ import os from 'os'; import fs from 'fs'; import path from 'path'; -import uuid from 'uuid'; +import { v1 as uuidv1 } from 'uuid'; // Public: GrammarUtils.D - a module which assist the creation of D temporary files export default { @@ -19,7 +19,7 @@ export default { try { if (!fs.existsSync(this.tempFilesDir)) { fs.mkdirSync(this.tempFilesDir); } - const tempFilePath = `${this.tempFilesDir + path.sep}m${uuid.v1().split('-').join('_')}.d`; + const tempFilePath = `${this.tempFilesDir + path.sep}m${uuidv1().split('-').join('_')}.d`; const file = fs.openSync(tempFilePath, 'w'); fs.writeSync(file, code); diff --git a/lib/grammar-utils/matlab.js b/lib/grammar-utils/matlab.js index dcc87596..b969f5e8 100644 --- a/lib/grammar-utils/matlab.js +++ b/lib/grammar-utils/matlab.js @@ -4,7 +4,7 @@ import os from 'os'; import fs from 'fs'; import path from 'path'; -import uuid from 'uuid'; +import { v1 as uuidv1 } from 'uuid'; // Public: GrammarUtils.MATLAB - a module which assist the creation of MATLAB temporary files export default { @@ -19,7 +19,7 @@ export default { try { if (!fs.existsSync(this.tempFilesDir)) { fs.mkdirSync(this.tempFilesDir); } - const tempFilePath = `${this.tempFilesDir + path.sep}m${uuid.v1().split('-').join('_')}.m`; + const tempFilePath = `${this.tempFilesDir + path.sep}m${uuidv1().split('-').join('_')}.m`; const file = fs.openSync(tempFilePath, 'w'); fs.writeSync(file, code); diff --git a/package.json b/package.json index d33bb471..fe98fc86 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "babel-preset-env": "^1.6.0", "strip-ansi": "^3.0.0", "underscore": "^1.8.3", - "uuid": "^3.0.1" + "uuid": "^8.3.2" }, "optionalDependencies": { "babel-cli": "^6.26.0", From 83507b8ce6773f2e3650f42778b2e54971a9d995 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Tue, 29 Dec 2020 17:45:39 -0600 Subject: [PATCH 2/2] chore: enable semantic release [skip ci] --- .github/workflows/CI.yml | 49 ++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0fab52b0..2c10ed72 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -51,30 +51,31 @@ jobs: - name: Lint ✨ run: npm run lint - # Release: - # needs: [Test, Lint] - # if: github.ref == 'refs/heads/master' && - # github.event.repository.fork == false - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v2 - # - uses: UziTech/action-setup-atom@v1 - # - uses: actions/setup-node@v1 - # with: - # node-version: "12.x" - # - name: NPM install - # run: npm install - # - name: Build and Commit - # run: npm run build-commit - # # NOTE: uncomment when ready - # # - name: Release 🎉 - # # uses: cycjimmy/semantic-release-action@v2 - # # with: - # # extends: | - # # @semantic-release/apm-config - # # env: - # # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # # ATOM_ACCESS_TOKEN: ${{ secrets.ATOM_ACCESS_TOKEN }} + Release: + needs: [Test, Lint] + if: github.ref == 'refs/heads/master' && + github.event.repository.fork == false + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: UziTech/action-setup-atom@v1 + - uses: actions/setup-node@v1 + with: + node-version: "12.x" + - name: NPM install + run: npm install + + # - name: Build and Commit + # run: npm run build-commit + + - name: Release 🎉 + uses: cycjimmy/semantic-release-action@v2 + with: + extends: | + @semantic-release/apm-config + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ATOM_ACCESS_TOKEN: ${{ secrets.ATOM_ACCESS_TOKEN }} Skip: if: contains(github.event.head_commit.message, '[skip ci]')