Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

Commit

Permalink
fix: try fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Jan 24, 2020
1 parent a4c9625 commit e21e3f9
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 58 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
deno: ['v0.30.0']
deno: ["v0.30.0"]
os: [ubuntu-latest, macOS-latest, windows-latest]
name: test in ${{ matrix.os }}
steps:
Expand All @@ -28,6 +28,13 @@ jobs:
run: |
yarn
- name: Build typescript-deno-plugin
working-directory: ./typescript-deno-plugin
run: |
yarn
yarn run compile
yarn lint
- name: Check code format
run: |
yarn run check
Expand All @@ -48,14 +55,22 @@ jobs:

release:
runs-on: ubuntu-latest
name: 'Release to vscode market and github'
name: "Release to vscode market and github"
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
needs: build
steps:
- uses: actions/download-artifact@v1
with:
name: package

- uses: actions/setup-node@v1
with:
node-version: "12.x"

- name: publish to vscode market
# require Azure DevOps Personal Access Token
run: npx vsce publish --packagePath ./package/vscode-deno.vsix --pat ${{ secrets.ADO_TOKEN }}

- uses: softprops/action-gh-release@v1
name: publish to Github
env:
Expand All @@ -65,11 +80,3 @@ jobs:
files: |
./package/vscode-deno.vsix
draft: false

- uses: actions/setup-node@v1
with:
node-version: '12.x'

- name: publish to vscode market
# require Azure DevOps Personal Access Token
run: npx vsce publish --packagePath ./package/vscode-deno.vsix --pat ${{ secrets.ADO_TOKEN }}
11 changes: 4 additions & 7 deletions typescript-deno-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@
"description": "Deno language service plugin for TypeScript",
"main": "out/index.js",
"scripts": {
"compile": "tsc && cp ./package.json ../node_modules/typescript-deno-plugin/package.json",
"watch": "cp ./package.json ../node_modules/typescript-deno-plugin/package.json && tsc -w -p ./",
"lint": "tslint -c tslint.json 'src/**/*.ts'",
"postinstall": "npm run compile"
"compile": "tsc",
"watch": "tsc -w -p ./",
"lint": "tslint -c tslint.json 'src/**/*.ts'"
},
"dependencies": {
"deepmerge": "^4.2.2",
"mock-require": "^3.0.3"
"deepmerge": "^4.2.2"
},
"devDependencies": {
"@types/mock-require": "^2.0.0",
"@types/node": "^12.0.4",
"tslint": "^5.17.0",
"typescript": "^3.5.1"
Expand Down
7 changes: 2 additions & 5 deletions typescript-deno-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import * as fs from "fs";
import * as path from "path";

import merge from "deepmerge";
import mockRequire from "mock-require";
import ts_module from "typescript/lib/tsserverlibrary";

import { Logger } from "./logger";
Expand All @@ -24,9 +23,6 @@ module.exports = function init({
}: {
typescript: typeof ts_module;
}) {
// Make sure Deno imports the correct version of TS
mockRequire("typescript", typescript);

// see https://github.com/denoland/deno/blob/2debbdacb935cfe1eb7bb8d1f40a5063b339d90b/js/compiler.ts#L159-L170
const OPTIONS: ts_module.CompilerOptions = {
allowJs: true,
Expand Down Expand Up @@ -72,7 +68,8 @@ module.exports = function init({
moduleNames,
containingFile,
reusedNames,
redirectedReference
redirectedReference,
{}
);
};

Expand Down
40 changes: 4 additions & 36 deletions typescript-deno-plugin/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,7 @@
esutils "^2.0.2"
js-tokens "^4.0.0"

"@types/mock-require@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@types/mock-require/-/mock-require-2.0.0.tgz#57a4f0db0b4b6274f610a2d2c20beb3c842181e1"
integrity sha512-nOgjoE5bBiDeiA+z41i95makyHUSMWQMOPocP+J67Pqx/68HAXaeWN1NFtrAYYV6LrISIZZ8vKHm/a50k0f6Sg==
dependencies:
"@types/node" "*"

"@types/node@*", "@types/node@^12.0.4":
"@types/node@^12.0.4":
version "12.0.4"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.0.4.tgz#46832183115c904410c275e34cf9403992999c32"
integrity sha512-j8YL2C0fXq7IONwl/Ud5Kt0PeXw22zGERt+HSSnwbKOJVsAGkEz3sFCYwaF9IOuoG1HOtE0vKCj6sXF7Q0+Vaw==
Expand Down Expand Up @@ -123,11 +116,6 @@ fs.realpath@^1.0.0:
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=

get-caller-file@^1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a"
integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==

glob@^7.1.1:
version "7.1.4"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255"
Expand Down Expand Up @@ -190,21 +178,6 @@ mkdirp@^0.5.1:
dependencies:
minimist "0.0.8"

mock-require@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/mock-require/-/mock-require-3.0.3.tgz#ccd544d9eae81dd576b3f219f69ec867318a1946"
integrity sha512-lLzfLHcyc10MKQnNUCv7dMcoY/2Qxd6wJfbqCcVk3LDb8An4hF6ohk5AztrvgKhJCqj36uyzi/p5se+tvyD+Wg==
dependencies:
get-caller-file "^1.0.2"
normalize-path "^2.1.1"

normalize-path@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=
dependencies:
remove-trailing-separator "^1.0.1"

once@^1.3.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
Expand All @@ -222,11 +195,6 @@ path-parse@^1.0.6:
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==

remove-trailing-separator@^1.0.1:
version "1.1.0"
resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"
integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8=

resolve@^1.3.2:
version "1.11.1"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.11.1.tgz#ea10d8110376982fef578df8fc30b9ac30a07a3e"
Expand Down Expand Up @@ -283,9 +251,9 @@ tsutils@^2.29.0:
tslib "^1.8.1"

typescript@^3.5.1:
version "3.5.1"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.1.tgz#ba72a6a600b2158139c5dd8850f700e231464202"
integrity sha512-64HkdiRv1yYZsSe4xC1WVgamNigVYjlssIoaH2HcZF0+ijsk5YK2g0G34w9wJkze8+5ow4STd22AynfO6ZYYLw==
version "3.7.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.5.tgz#0692e21f65fd4108b9330238aac11dd2e177a1ae"
integrity sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==

wrappy@1:
version "1.0.2"
Expand Down

0 comments on commit e21e3f9

Please sign in to comment.