Skip to content

Commit

Permalink
Merge branch 'master' into initialize-processor-in-build
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Aug 21, 2022
2 parents c41750f + b0989ba commit 81a08b5
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 59 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI

on:
push:
branches:
- main
- master
- 'v*'
# always run CI for tags
tags:
- '*'
pull_request: {}

concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
test:
name: "Tests - ${{ matrix.os }} - Node ${{ matrix.node-version }}"
runs-on: "${{ matrix.os }}-latest"

strategy:
matrix:
os: [ubuntu]
node-version: ['10.x', '12.x']

steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v3.0.0-beta.1
with:
node-version: ${{ matrix.node-version }}

- run: yarn install --frozen-lockfile --non-interactive
- run: yarn test

floating-dependencies:
name: "Floating Deps"
runs-on: "ubuntu-latest"

steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v3.0.0-beta.1

- run: yarn install --no-lockfile
- run: yarn test
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

32 changes: 0 additions & 32 deletions appveyor.yml

This file was deleted.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,9 @@
},
"engines": {
"node": "10.* || >= 12.*"
},
"volta": {
"node": "12.22.12",
"yarn": "1.22.19"
}
}
4 changes: 2 additions & 2 deletions src/util/resolveRelative.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as path from 'path';
import { posix as path } from 'path';

const PARENT_DIR = '..' + path.sep;

Expand Down Expand Up @@ -30,4 +30,4 @@ export default function resolveRelative(relativePath: string, ...otherPaths: Arr
}
}
return cumulativePath;
}
}
2 changes: 1 addition & 1 deletion test/dependencies-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function touch(filePath, contents) {
}
}

describe('relativePath utility', function() {
describe('resolveRelative utility', function() {
it('resolves a relative path', function() {
assert.equal(resolveRelative('.', 'foo.txt'), 'foo.txt');
});
Expand Down
3 changes: 2 additions & 1 deletion test/helpers/inliner.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ var path = require('path');
var fs = require('fs');
var Filter = require('../../');
var minimatch = require('minimatch');
var resolveRelative = require('../../lib/util/resolveRelative').default;

class Inliner extends Filter {
constructor(inputTree, _options) {
Expand Down Expand Up @@ -36,7 +37,7 @@ class Inliner extends Filter {
deps.push(fileRef);
lines[i] = fs.readFileSync(fileRef, "utf8").trim();
} else {
let filePath = path.normalize(path.resolve("/", path.dirname(relativePath), fileRef)).substring(1);
let filePath = resolveRelative(path.dirname(relativePath), fileRef);
deps.push(filePath);
lines[i] = this.input.readFileSync(filePath, "utf8").trim();
}
Expand Down

0 comments on commit 81a08b5

Please sign in to comment.