Skip to content

Commit

Permalink
Release v1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilafian committed Sep 17, 2022
1 parent 4d5342a commit ad19878
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion dist/w3c-html-validator.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! w3c-html-validator v1.1.0 ~~ https://github.com/center-key/w3c-html-validator ~~ MIT License
//! w3c-html-validator v1.1.1 ~~ https://github.com/center-key/w3c-html-validator ~~ MIT License

export declare type ValidatorOptions = {
html?: string;
Expand Down
9 changes: 5 additions & 4 deletions dist/w3c-html-validator.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
//! w3c-html-validator v1.1.0 ~~ https://github.com/center-key/w3c-html-validator ~~ MIT License
//! w3c-html-validator v1.1.1 ~~ https://github.com/center-key/w3c-html-validator ~~ MIT License

import { readFileSync } from 'fs';
import chalk from 'chalk';
import log from 'fancy-log';
import request from 'superagent';
const w3cHtmlValidator = {
version: '1.1.0',
version: '1.1.1',
validate(options) {
var _a;
const defaults = {
checkUrl: 'https://validator.w3.org/nu/',
ignoreLevel: null,
Expand All @@ -21,8 +22,8 @@ const w3cHtmlValidator = {
if (settings.output !== 'json' && settings.output !== 'html')
throw Error('[w3c-html-validator] Option "output" must be "json" or "html".');
const mode = settings.html ? 'html' : settings.filename ? 'filename' : 'website';
const readFile = () => settings.filename ? readFileSync(settings.filename, 'utf8') : null;
const inputHtml = settings.html || readFile();
const readFile = (filename) => readFileSync(filename, 'utf8').replace(/\r/g, '');
const inputHtml = (_a = settings.html) !== null && _a !== void 0 ? _a : (settings.filename ? readFile(settings.filename) : null);
const makePostRequest = () => request.post(settings.checkUrl)
.set('Content-Type', 'text/html; encoding=utf-8')
.send(inputHtml);
Expand Down
9 changes: 5 additions & 4 deletions dist/w3c-html-validator.umd.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! w3c-html-validator v1.1.0 ~~ https://github.com/center-key/w3c-html-validator ~~ MIT License
//! w3c-html-validator v1.1.1 ~~ https://github.com/center-key/w3c-html-validator ~~ MIT License

var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
Expand All @@ -20,8 +20,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
const fancy_log_1 = __importDefault(require("fancy-log"));
const superagent_1 = __importDefault(require("superagent"));
const w3cHtmlValidator = {
version: '1.1.0',
version: '1.1.1',
validate(options) {
var _a;
const defaults = {
checkUrl: 'https://validator.w3.org/nu/',
ignoreLevel: null,
Expand All @@ -36,8 +37,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
if (settings.output !== 'json' && settings.output !== 'html')
throw Error('[w3c-html-validator] Option "output" must be "json" or "html".');
const mode = settings.html ? 'html' : settings.filename ? 'filename' : 'website';
const readFile = () => settings.filename ? (0, fs_1.readFileSync)(settings.filename, 'utf8') : null;
const inputHtml = settings.html || readFile();
const readFile = (filename) => (0, fs_1.readFileSync)(filename, 'utf8').replace(/\r/g, '');
const inputHtml = (_a = settings.html) !== null && _a !== void 0 ? _a : (settings.filename ? readFile(settings.filename) : null);
const makePostRequest = () => superagent_1.default.post(settings.checkUrl)
.set('Content-Type', 'text/html; encoding=utf-8')
.send(inputHtml);
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": "w3c-html-validator",
"version": "1.1.0",
"version": "1.1.1",
"description": "A package for testing HTML files or URLs against the W3C validator (written in functional TypeScript)",
"license": "MIT",
"type": "module",
Expand Down

0 comments on commit ad19878

Please sign in to comment.