Commit ad9cf683 authored by David Sveningsson's avatar David Sveningsson
Browse files

fix: broken typescript declaration in previous release

Fixes #127
parent 8777a276
Pipeline #334962534 passed with stages
in 11 minutes and 17 seconds
......@@ -58,7 +58,7 @@ Changelog:
ESLint:
stage: test
needs: ["NPM"]
needs: ["NPM", "Build"]
script:
- npm run eslint -- --max-warnings 0
......@@ -141,6 +141,7 @@ Module:
- "esm"
- "cjs"
script:
- npm exec tsc -- --build tests/integration/${BUILD}
- node tests/integration/${BUILD}
Release:
......
......@@ -10193,8 +10193,8 @@
"dev": true
},
"node_modules/html-validate": {
"link": true,
"resolved": ""
"resolved": "",
"link": true
},
"node_modules/html-void-elements": {
"version": "1.0.5",
......@@ -154,12 +154,13 @@ function build(format) {
delimiters: ["", ""],
values: {
/**
* Fix the path from dist/types/browser.d.ts
* Bug #127: workaround the issue that the exported version is
* turned into a constant by the json plugin instead of the expected
* "declare const version" required by typescript.
*/
'"../package.json"': '"../../package.json"',
'export { version } from "../package.json";': "export const version: string;",
},
}),
json(jsonConfig),
dts(),
copy({
verbose: true,
......
......@@ -15,4 +15,6 @@ export { TransformContext, Transformer, TemplateExtractor } from "./transform";
export { Plugin } from "./plugin";
export { Parser } from "./parser";
export { ruleExists } from "./utils";
/* Bug #127: this line need special care, see rollup.config.js */
export { version } from "../package.json";
import { version } from "html-validate";
/* eslint-disable-next-line no-console */
console.log(`html-validate version is ${version}`);
{
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node"
},
"include": ["*.ts", "*.js"]
}
import { version } from "html-validate";
/* eslint-disable-next-line no-console */
console.log(`html-validate version is ${version}`);
{
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node"
},
"include": ["*.ts", "*.js"]
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment