Skip to content

Commit 628b2e8

Browse files
author
syncatallah
committed
merge readme-wrong-doc from upstream master
2 parents 135b434 + 37bb5e1 commit 628b2e8

17 files changed

+5782
-4623
lines changed

.bithoundrc

-15
This file was deleted.

.travis.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
sudo: false
21
language: node_js
32
cache:
43
directories:
54
- node_modules
65
notifications:
76
email: true
87
node_js:
9-
- "node"
8+
- 14
9+
- 13
10+
- 12
11+
- 10
1012
script:
1113
- npm test
1214
after_script:

appveyor.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
environment:
22
matrix:
3-
- nodejs_version: 8
4-
- nodejs_version: 6
3+
- nodejs_version: 14
4+
- nodejs_version: 13
5+
- nodejs_version: 12
6+
- nodejs_version: 10
57
install:
68
- ps: Install-Product node $env:nodejs_version
79
- set CI=true
@@ -18,4 +20,4 @@ test_script:
1820
after_test:
1921
- npm run codecov
2022
cache:
21-
- '%APPDATA%\npm-cache'
23+
- '%APPDATA%\npm-cache'

package-lock.json

+5,731-4,558
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+24-24
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,34 @@
1515
"Rafał Ruciński (https://github.com/fatfisz)"
1616
],
1717
"devDependencies": {
18-
"@babel/cli": "7.2.3",
19-
"@babel/core": "7.2.2",
20-
"@babel/plugin-proposal-class-properties": "7.2.3",
21-
"@babel/plugin-proposal-export-default-from": "7.2.0",
22-
"@babel/preset-env": "7.2.3",
23-
"babel-core": "7.0.0-bridge.0",
24-
"babel-eslint": "10.0.1",
25-
"babel-plugin-add-module-exports": "1.0.0",
26-
"codecov": "3.1.0",
27-
"cross-env": "5.2.0",
28-
"doctoc": "1.4.0",
29-
"eslint": "5.12.1",
30-
"eslint-config-prettier": "3.6.0",
31-
"eslint-plugin-prettier": "3.0.1",
32-
"jest": "23.6.0",
33-
"micromatch": "3.1.10",
34-
"prettier": "1.16.0",
35-
"rimraf": "2.6.3",
36-
"rollup": "1.1.1",
37-
"rollup-plugin-babel": "4.3.2",
38-
"rollup-plugin-node-resolve": "4.0.0",
39-
"rollup-plugin-uglify": "6.0.1"
18+
"@babel/cli": "^7.10.1",
19+
"@babel/core": "^7.10.2",
20+
"@babel/plugin-proposal-class-properties": "^7.10.1",
21+
"@babel/plugin-proposal-export-default-from": "^7.10.1",
22+
"@babel/preset-env": "^7.10.2",
23+
"@rollup/plugin-babel": "^5.0.2",
24+
"@rollup/plugin-node-resolve": "^8.0.0",
25+
"babel-core": "^6.26.3",
26+
"babel-eslint": "^10.1.0",
27+
"babel-plugin-add-module-exports": "^1.0.2",
28+
"codecov": "^3.7.0",
29+
"cross-env": "^7.0.2",
30+
"doctoc": "^1.4.0",
31+
"eslint": "^7.1.0",
32+
"eslint-config-prettier": "^6.11.0",
33+
"eslint-plugin-prettier": "^3.1.3",
34+
"jest": "^26.0.1",
35+
"micromatch": "^4.0.2",
36+
"prettier": "^2.0.5",
37+
"rimraf": "^3.0.2",
38+
"rollup": "^2.12.0",
39+
"rollup-plugin-uglify": "^6.0.4"
4040
},
4141
"directories": {
4242
"lib": "lib"
4343
},
4444
"engines": {
45-
"node": ">=4.0.0"
45+
"node": ">=10.0.0"
4646
},
4747
"homepage": "https://github.com/declandewet/common-tags",
4848
"keywords": [
@@ -87,7 +87,7 @@
8787
"url": "https://github.com/declandewet/common-tags"
8888
},
8989
"scripts": {
90-
"clear": "rimraf lib && rimraf es",
90+
"clear": "rimraf lib && rimraf es && rimraf dist",
9191
"build": "npm run clear && npm run build:cjs && npm run build:es && npm run build:unpkg",
9292
"build:cjs": "babel src --out-dir lib --ignore **/*.test.js",
9393
"build:es": "cross-env BABEL_ENV=es babel src --out-dir es --ignore **/*.test.js",

readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ html`
2424
| License | [![npm license](https://img.shields.io/npm/l/common-tags.svg?style=flat-square)](https://github.com/declandewet/common-tags/blob/master/license.md) |
2525
| Popularity | [![npm downloads](https://img.shields.io/npm/dm/common-tags.svg?style=flat-square)](http://npm-stat.com/charts.html?package=common-tags) |
2626
| Testing | [![Build status](https://ci.appveyor.com/api/projects/status/75eiommx0llt3sgd?svg=true)](https://ci.appveyor.com/project/declandewet/common-tags) [![build status](https://img.shields.io/travis/declandewet/common-tags.svg?style=flat-square)](https://travis-ci.org/declandewet/common-tags) [![codecov.io](https://img.shields.io/codecov/c/gh/declandewet/common-tags.svg?style=flat-square)](https://codecov.io/gh/declandewet/common-tags?branch=master) |
27-
| Quality | [![bitHound Overall Score](https://www.bithound.io/github/declandewet/common-tags/badges/score.svg)](https://www.bithound.io/github/declandewet/common-tags) [![dependency status](https://img.shields.io/david/declandewet/common-tags.svg?style=flat-square)](https://david-dm.org/declandewet/common-tags) [![dev dependency status](https://img.shields.io/david/dev/declandewet/common-tags.svg?style=flat-square)](https://david-dm.org/declandewet/common-tags#info=devDependencies) |
27+
| Quality | [![dependency status](https://img.shields.io/david/declandewet/common-tags.svg?style=flat-square)](https://david-dm.org/declandewet/common-tags) [![dev dependency status](https://img.shields.io/david/dev/declandewet/common-tags.svg?style=flat-square)](https://david-dm.org/declandewet/common-tags#info=devDependencies) |
2828
| Style | [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier) |
2929

3030
<!-- START doctoc generated TOC please keep comment here to allow auto update -->

rollup.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import babel from 'rollup-plugin-babel';
2-
import resolve from 'rollup-plugin-node-resolve';
1+
import babel from '@rollup/plugin-babel';
2+
import resolve from '@rollup/plugin-node-resolve';
33
import { uglify } from 'rollup-plugin-uglify';
44

55
export default {

src/createTag/createTag.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function getInterimTag(originalTag, extraTag) {
3333
function getTagCallInfo(transformers) {
3434
return {
3535
transformers,
36-
context: transformers.map(transformer =>
36+
context: transformers.map((transformer) =>
3737
transformer.getInitialContext ? transformer.getInitialContext() : {},
3838
),
3939
};
@@ -98,7 +98,7 @@ export default function createTag(...rawTransformers) {
9898

9999
// if the first argument is an array, return a transformed end result of processing the template with our tag
100100
const processedTemplate = strings
101-
.map(string => applyHook0(tagCallInfo, 'onString', string))
101+
.map((string) => applyHook0(tagCallInfo, 'onString', string))
102102
.reduce((result, string, index) =>
103103
''.concat(
104104
result,

src/createTag/createTag.test.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ test('transformer methods are optional', () => {
1919
});
2020
const noStringNorEnd = createTag({
2121
onSubstitution(sub) {
22-
return sub
23-
.split('')
24-
.reverse()
25-
.join('');
22+
return sub.split('').reverse().join('');
2623
},
2724
});
2825
expect(noMethods`foo`).toBe('foo');

src/html/html.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ test('renders HTML, including arrays', () => {
1010
const actual = html`
1111
<h1>${val}${nil}</h1>
1212
<ul>
13-
${fruits.map(fruit => `<li>${fruit}</li>`)}
13+
${fruits.map((fruit) => `<li>${fruit}</li>`)}
1414
</ul>
1515
`;
1616

src/index.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ function requireModule(module) {
1717
test('common-tags exports all the right modules directly', () => {
1818
const modules = context.modules;
1919
expect.assertions(modules.length);
20-
modules.forEach(module => {
20+
modules.forEach((module) => {
2121
expect(requireModule(module)).toBeDefined();
2222
});
2323
});
2424

2525
test('common-tags exports all the right modules as props', () => {
2626
const modules = context.modules;
2727
expect.assertions(modules.length);
28-
modules.forEach(module => {
28+
modules.forEach((module) => {
2929
expect(require('./index')).toHaveProperty(module, requireModule(module));
3030
});
3131
});

src/removeNonPrintingValuesTransformer/removeNonPrintingValuesTransformer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const isValidValue = x =>
1+
const isValidValue = (x) =>
22
x != null && !Number.isNaN(x) && typeof x !== 'boolean';
33

44
const removeNonPrintingValuesTransformer = () => ({

src/safeHtml/safeHtml.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ test('renders HTML, including arrays', () => {
99
const actual = safeHtml`
1010
<h1>${val}</h1>
1111
<ul>
12-
${fruits.map(fruit => `${fruit}`)}
12+
${fruits.map((fruit) => `${fruit}`)}
1313
</ul>
1414
`;
1515
expect(actual).toBe(expected);
@@ -34,7 +34,7 @@ test('correctly escapes HTML tags on substitution', () => {
3434
const actual = safeHtml`
3535
<h1>${val}</h1>
3636
<ul>
37-
${fruits.map(fruit => `${fruit}`)}
37+
${fruits.map((fruit) => `${fruit}`)}
3838
</ul>
3939
`;
4040
expect(actual).toBe(expected);

src/splitStringTransformer/splitStringTransformer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const splitStringTransformer = splitBy => {
1+
const splitStringTransformer = (splitBy) => {
22
if (typeof splitBy !== 'string') {
33
throw new Error('You need to specify a string character to split by.');
44
}

src/stripIndentTransformer/stripIndentTransformer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const stripIndentTransformer = (type = 'initial') => {
1919

2020
// remove the shortest leading indentation from each line
2121
const match = endResult.match(/^[^\S\n]*(?=\S)/gm);
22-
const indent = match && Math.min(...match.map(el => el.length));
22+
const indent = match && Math.min(...match.map((el) => el.length));
2323
if (indent) {
2424
const regexp = new RegExp(`^.{${indent}}`, 'gm');
2525
return endResult.replace(regexp, '');

src/testUtils/index.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ function requireModule(module) {
1717
test('test utils exports all the right modules directly', () => {
1818
const modules = context.modules;
1919
expect.assertions(modules.length);
20-
modules.forEach(module => {
20+
modules.forEach((module) => {
2121
expect(requireModule(module)).toBeDefined();
2222
});
2323
});
2424

2525
test('test utils exports all the right modules as props', () => {
2626
const modules = context.modules;
2727
expect.assertions(modules.length);
28-
modules.forEach(module => {
28+
modules.forEach((module) => {
2929
expect(require('./index')).toHaveProperty(module, requireModule(module));
3030
});
3131
});

src/utils/index.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ function requireModule(module) {
1717
test('utils exports all the right modules directly', () => {
1818
const modules = context.modules;
1919
expect.assertions(modules.length);
20-
modules.forEach(module => {
20+
modules.forEach((module) => {
2121
expect(requireModule(module)).toBeDefined();
2222
});
2323
});
2424

2525
test('utils exports all the right modules as props', () => {
2626
const modules = context.modules;
2727
expect.assertions(modules.length);
28-
modules.forEach(module => {
28+
modules.forEach((module) => {
2929
expect(require('./index')).toHaveProperty(module, requireModule(module));
3030
});
3131
});

0 commit comments

Comments
 (0)