Skip to content

Commit

Permalink
Fix export
Browse files Browse the repository at this point in the history
Closes GH-15.

Reviewed-by: Titus Wormer <[email protected]>
  • Loading branch information
remcohaszing authored Dec 23, 2021
1 parent fc82fbe commit 6e10e72
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
* @typedef {import('./lib/index.js').Options} Options
*/

export {configureUnifiedLanguageServer} from './lib/index.js'
export {createUnifiedLanguageServer} from './lib/index.js'
12 changes: 11 additions & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {pathToFileURL} from 'node:url'

import {spy, stub} from 'sinon'
import test from 'tape'
import * as exports from 'unified-language-server'
import {
DiagnosticSeverity,
Position,
Expand All @@ -12,7 +13,10 @@ import {
} from 'vscode-languageserver/node.js'
import {TextDocument} from 'vscode-languageserver-textdocument'

import {configureUnifiedLanguageServer} from '../lib/index.js'
import {
configureUnifiedLanguageServer,
createUnifiedLanguageServer
} from '../lib/index.js'

/**
* @returns {import('vscode-languageserver').Connection}
Expand Down Expand Up @@ -449,3 +453,9 @@ test('onDidChangeWatchedFiles', async (t) => {

t.end()
})

test('exports', (t) => {
t.equal(exports.createUnifiedLanguageServer, createUnifiedLanguageServer)

t.end()
})
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"moduleResolution": "node",
"skipLibCheck": true,
"strict": true,
"target": "ES2020"
"target": "ES2020",
"paths": {
"unified-language-server": ["./index.js"]
}
}
}

0 comments on commit 6e10e72

Please sign in to comment.