Skip to content

Commit

Permalink
Merge pull request #8 from citkane/dev
Browse files Browse the repository at this point in the history
Bump to v0.1.1
  • Loading branch information
citkane committed Aug 24, 2022
2 parents ac128d4 + 6c14697 commit bcc68b0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ on:
- 'dev'
jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [14.x, 15.x, 16.x]
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typedoc-plugin-versions",
"version": "0.1.0",
"version": "0.1.1",
"description": "It keeps track of your document builds and provides a select menu for versions",
"main": "src/index",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions src/etc/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export function makeStableLink(
stableSource = path.join(docRoot, stableSource);
const stableTarget = path.join(docRoot, name);
fs.existsSync(stableTarget) && fs.unlinkSync(stableTarget);
fs.createSymlinkSync(stableSource, stableTarget, 'dir');
fs.ensureSymlinkSync(stableSource, stableTarget, 'junction');
}

/**
Expand All @@ -183,7 +183,7 @@ export function makeDevLink(
throw new Error(`Document directory does not exist: ${pegVersion}`);
const devTarget = path.join(docRoot, name);
fs.existsSync(devTarget) && fs.unlinkSync(devTarget);
fs.createSymlinkSync(devSource, devTarget, 'dir');
fs.ensureSymlinkSync(devSource, devTarget, 'junction');
}

/**
Expand All @@ -198,7 +198,7 @@ export function makeMinorVersionLinks(semGroups, docRoot): void {
const target = path.join(docRoot, `${major}.${minor}`);
const src = path.join(docRoot, `${major}.${minor}.${patch}`);
fs.existsSync(target) && fs.unlinkSync(target);
fs.createSymlinkSync(src, target, 'dir');
fs.ensureSymlinkSync(src, target, 'junction');
});
});
}
Expand Down
2 changes: 1 addition & 1 deletion test/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ export const mochaHooks = {

const deleteFolders = (folders: string[]) => {
folders.forEach((folder) => {
fs.existsSync(folder) && fs.rmdirSync(folder, { recursive: true });
fs.existsSync(folder) && fs.rmSync(folder, { recursive: true });
});
};
4 changes: 2 additions & 2 deletions test/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ describe('Unit testing for typedoc-plugin-versions', function () {
'did not create a stable symlink'
);
assert.isTrue(
/test[/|\\]stubs[/|\\]docs[/|\\]v0.1.1$/.test(
/test[/|\\]stubs[/|\\]docs[/|\\]v0.1.[1$|1/$|1\\$]/.test(
fs.readlinkSync(link)
),
'did not link the stable symlink correctly'
Expand All @@ -113,7 +113,7 @@ describe('Unit testing for typedoc-plugin-versions', function () {
const link = path.join(docsPath, 'dev');
assert.isTrue(fs.existsSync(link), 'did not create a dev symlink');
assert.isTrue(
/test[/|\\]stubs[/|\\]docs[/|\\]v0.1.0/.test(
/test[/|\\]stubs[/|\\]docs[/|\\]v0.1.[0$|0/$|0\\$]/.test(
fs.readlinkSync(link)
),
'did not link the dev symlink correctly'
Expand Down

0 comments on commit bcc68b0

Please sign in to comment.