diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml new file mode 100644 index 00000000..2964c1c3 --- /dev/null +++ b/.github/workflows/nodejs.yml @@ -0,0 +1,27 @@ +name: Node CI + +on: [push] + +jobs: + build: + + runs-on: windows-latest + + strategy: + matrix: + node-version: [8.x, 10.x, 12.x] + + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: install dependencies + run: npm install + env: + CI: true + - name: test + run: npm test + env: + CI: true \ No newline at end of file diff --git a/src/parser.ts b/src/parser.ts index 397057f0..f7e015ac 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -977,7 +977,7 @@ function getParentType(prop: ts.Symbol): ParentType | undefined { const parentName = parent.name.text; const { fileName } = parent.getSourceFile(); - const fileNameParts = fileName.split(path.sep); + const fileNameParts = fileName.split('/'); const trimmedFileNameParts = fileNameParts.slice(); while (trimmedFileNameParts.length) { @@ -988,7 +988,7 @@ function getParentType(prop: ts.Symbol): ParentType | undefined { } let trimmedFileName; if (trimmedFileNameParts.length) { - trimmedFileName = trimmedFileNameParts.join(path.sep); + trimmedFileName = trimmedFileNameParts.join('/'); } else { trimmedFileName = fileName; }