Compare commits

..

22 Commits

Author SHA1 Message Date
github-actions[bot]
8eede4b16b Version Packages 2021-06-30 15:24:07 +02:00
Thomas Allmer
2294ccf4a2 chore: only release patch versions 2021-06-30 15:20:51 +02:00
Benny Powers
3b1a0cf26a feat(cli): expose checkLinks options 2021-06-30 15:18:36 +02:00
Benny Powers
cf442215a9 feat: add slack invite 2021-06-30 15:02:33 +02:00
Thomas Allmer
41049f3908 chore: fix launch tests 2021-06-30 14:36:54 +02:00
Thomas Allmer
2b5c61d19c feat: no responsive images for svgs & option to define ignores 2021-06-30 14:36:54 +02:00
Jorge del Casar
f5d349e256 feat(launch): load used fonts from google fonts 2021-06-28 21:00:13 +02:00
Jorge del Casar
ce0b00e7a1 fix(cli): don't transform external images
Fix #141
2021-06-28 20:59:28 +02:00
github-actions[bot]
83286a99de Version Packages 2021-06-22 18:42:00 +02:00
Thijs Louisse
6cabdba5f6 feat(rocket): upgrade to lit2 2021-06-22 18:27:19 +02:00
github-actions[bot]
f5f2d69d0c Version Packages 2021-06-22 15:00:26 +02:00
Thomas Allmer
795a3613af fix(cli): service worker url respects pathPrefix 2021-06-22 14:57:52 +02:00
github-actions[bot]
bcf8f4fe83 Version Packages 2021-06-21 16:25:40 +02:00
Thomas Allmer
5330740cb3 fix(cli): replace images to be responsive from the bottom up 2021-06-21 16:20:48 +02:00
Thomas Allmer
2edd61beaa chore: remove image hashes from tests 2021-06-21 15:56:41 +02:00
github-actions[bot]
2a5fc08f35 Version Packages 2021-06-21 14:37:07 +02:00
Thomas Allmer
43a7ca10c3 fix(cli): responsive images need to respect pathPrefix 2021-06-21 14:35:51 +02:00
github-actions[bot]
da39fa72f3 Version Packages 2021-06-16 09:08:08 +02:00
Thomas Allmer
a0e8edfbb9 fix(check-html-links): ignore not http schema urls 2021-06-16 09:04:05 +02:00
Thomas Allmer
50434293bb fix(check-html-links): ignore tel links 2021-06-16 09:04:05 +02:00
Thomas Allmer
f08f92615b fix(check-html-links): add missing slash dependency 2021-06-16 09:04:05 +02:00
Thomas Allmer
1949b1e1cb fix(check-html-links): ignore html encoded mailto links 2021-06-16 09:04:05 +02:00
50 changed files with 782 additions and 114 deletions

View File

@@ -9,6 +9,11 @@ module.exports = async function () {
name: 'GitHub', name: 'GitHub',
url: 'https://github.com/modernweb-dev/rocket', url: 'https://github.com/modernweb-dev/rocket',
}, },
{
name: 'Slack',
url:
'https://join.slack.com/t/lit-and-friends/shared_invite/zt-llwznvsy-LZwT13R66gOgnrg12PUGqw',
},
], ],
gitSiteUrl: 'https://github.com/modernweb-dev/rocket', gitSiteUrl: 'https://github.com/modernweb-dev/rocket',
gitBranch: 'main', gitBranch: 'main',

View File

@@ -1,11 +1,3 @@
<link
href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&display=swap"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap"
rel="stylesheet"
/>
<meta name="twitter:creator" content="@modern_web_dev" /> <meta name="twitter:creator" content="@modern_web_dev" />
<link rel="stylesheet" href="{{ '/_assets/body.css' | asset | url }}" mdjs-use> <link rel="stylesheet" href="{{ '/_assets/body.css' | asset | url }}" mdjs-use>

View File

@@ -100,6 +100,82 @@ export default {
}; };
``` ```
## Ignoring Images
Files ending in `.svg` or that include `rocket-ignore.` will remain untouched.
For example
```md
![Logo stays svg](logo.svg)
![Ignore by file name](my-image.rocket-unresponsive.jpg)
![My Image Alternative Text](my-image.jpeg)
```
becomes
```html
<img src="logo.svg" alt="Logo stays svg" rocket-image="responsive" />
<img src="my-image.rocket-unresponsive.jpg" alt="Ignore by file name" rocket-image="responsive" />
<picture>[...] </picture>
```
### Adjusting ignore function
The default ignore function looks like this
```js
/**
* The default responsive ignore function will ignore files
* - ending in `.svg`
* - containing `rocket-unresponsive.`
*
* @param {object} opts
* @param {string} opts.src
* @param {string} opts.title
* @param {string} opts.alt
* @param {{name: string, value: string}[]} opts.attributes
* @returns {boolean}
*/
function ignore({ src }) {
return src.endsWith('svg') || src.includes('rocket-unresponsive.');
}
```
and you can adjust it by setting it via the `imagePreset`.
For this example we want to also ignore `.jpeg` files.
👉 `rocket.config.js`
```js
export default {
imagePresets: {
responsive: {
// ...
ignore: ({ src }) =>
src.endsWith('.jpeg') || src.endsWith('svg') || src.includes('rocket-unresponsive.'),
},
},
};
```
With that setting we get the following behavior
```md
![Logo stays svg](logo.svg)
![Ignore by file name](my-image.rocket-unresponsive.jpg)
![My Image Alternative Text](my-image.jpeg)
```
becomes
```html
<img src="logo.svg" alt="Logo stays svg" rocket-image="responsive" />
<img src="my-image.rocket-unresponsive.jpg" alt="Ignore by file name" rocket-image="responsive" />
<img src="my-image.jpeg" alt="My Image Alternative Text" rocket-image="responsive" />
```
## Defining your own presets ## Defining your own presets
You can add your own image preset like so You can add your own image preset like so

View File

@@ -1,5 +1,31 @@
# check-html-links # check-html-links
## 0.2.3
### Patch Changes
- 5043429: Ignore `<a href="tel:9999">` links
- f08f926: Add missing `slash` dependency
- a0e8edf: Ignore links containing not http schema urls like `sketch://`, `vscode://`, ...
```html
<a href="sketch://add-library?url=https%3A%2F%2Fmyexample.com%2Fdesign%2Fui-kit.xml"></a>
<a href="vscode://file/c:/myProject/package.json:5:10"></a>
```
- 1949b1e: Ignore plain and html encoded mailto links
```html
<!-- source -->
<a href="mailto:address@example.com">contact</a>
<!-- html encoded -->
<a
href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#97;&#100;&#100;&#114;&#101;&#115;&#115;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;"
>contact</a
>
```
## 0.2.2 ## 0.2.2
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "check-html-links", "name": "check-html-links",
"version": "0.2.2", "version": "0.2.3",
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
@@ -37,7 +37,8 @@
"command-line-args": "^5.1.1", "command-line-args": "^5.1.1",
"glob": "^7.0.0", "glob": "^7.0.0",
"minimatch": "^3.0.4", "minimatch": "^3.0.4",
"sax-wasm": "^2.0.0" "sax-wasm": "^2.0.0",
"slash": "^3.0.0"
}, },
"devDependencies": { "devDependencies": {
"@types/glob": "^7.0.0" "@types/glob": "^7.0.0"

View File

@@ -182,6 +182,18 @@ function getValueAndAnchor(inValue) {
}; };
} }
/**
* @param {string} url
* @returns {boolean}
*/
function isNonHttpSchema(url) {
const found = url.match(/([a-z]+):/);
if (found) {
return found.length > 0;
}
return false;
}
/** /**
* *
* @param {Link[]} links * @param {Link[]} links
@@ -207,8 +219,13 @@ async function resolveLinks(links, { htmlFilePath, rootDir, ignoreUsage }) {
if (ignoreUsage(value)) { if (ignoreUsage(value)) {
// ignore // ignore
} else if (value.includes('mailto:')) { } else if (
value.startsWith('mailto:') ||
value.startsWith('&#109;&#97;&#105;&#108;&#116;&#111;&#58;') // = "mailto:" but html encoded
) {
// ignore for now - could add a check to validate if the email address is valid // ignore for now - could add a check to validate if the email address is valid
} else if (value.startsWith('tel:')) {
// ignore for now - could add a check to validate if the phone number is valid
} else if (valueFile === '' && anchor !== '') { } else if (valueFile === '' && anchor !== '') {
addLocalFile(htmlFilePath, anchor, usageObj); addLocalFile(htmlFilePath, anchor, usageObj);
} else if (value.startsWith('//') || value.startsWith('http')) { } else if (value.startsWith('//') || value.startsWith('http')) {
@@ -219,6 +236,8 @@ async function resolveLinks(links, { htmlFilePath, rootDir, ignoreUsage }) {
addLocalFile(filePath, anchor, usageObj); addLocalFile(filePath, anchor, usageObj);
} else if (value === '' && anchor === '') { } else if (value === '' && anchor === '') {
// no need to check it // no need to check it
} else if (isNonHttpSchema(value)) {
// not a schema we handle
} else { } else {
const filePath = path.join(path.dirname(htmlFilePath), valueFile); const filePath = path.join(path.dirname(htmlFilePath), valueFile);
addLocalFile(filePath, anchor, usageObj); addLocalFile(filePath, anchor, usageObj);

View File

@@ -1 +1,3 @@
<a href="mailto:foo@bar.com"></a> <a href="mailto:foo@bar.com"></a>
<!-- encoded mailto links -->
<a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#97;&#100;&#100;&#114;&#101;&#115;&#115;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;"></a>

View File

@@ -0,0 +1,2 @@
<a href="sketch://add-library?url=https%3A%2F%2Fmyexample.com%2Fdesign%2Fui-kit.xml"></a>
<a href="vscode://file/c:/myProject/package.json:5:10"></a>

View File

@@ -0,0 +1 @@
<a href="tel:99999"></a>

View File

@@ -183,6 +183,16 @@ describe('validateFolder', () => {
expect(cleanup(errors)).to.deep.equal([]); expect(cleanup(errors)).to.deep.equal([]);
}); });
it('ignores tel links', async () => {
const { errors, cleanup } = await execute('fixtures/tel');
expect(cleanup(errors)).to.deep.equal([]);
});
it('ignore not http schema urls', async () => {
const { errors, cleanup } = await execute('fixtures/not-http-schema');
expect(cleanup(errors)).to.deep.equal([]);
});
it('ignoring a folder', async () => { it('ignoring a folder', async () => {
const { errors, cleanup } = await execute('fixtures/internal-link-ignore', { const { errors, cleanup } = await execute('fixtures/internal-link-ignore', {
ignoreLinkPatterns: ['./relative/*', './relative/**/*'], ignoreLinkPatterns: ['./relative/*', './relative/**/*'],

View File

@@ -1,5 +1,53 @@
# @rocket/cli # @rocket/cli
## 0.9.4
### Patch Changes
- 2b5c61d: Allow configuring the imagePreset ignore rules via the option `ignore`
```js
export default {
imagePresets: {
responsive: {
// ...
ignore: ({ src }) =>
src.endsWith('.jpeg') || src.endsWith('svg') || src.includes('rocket-unresponsive.'),
},
},
};
```
- 2b5c61d: Do not generate responsive images for files ending in `.svg` or that include `rocket-ignore.`
- ce0b00e: don't transform external images
- 3b1a0cf: Allow to configure check-html-links
```js
export default {
checkLinks: {
/* ... */
},
};
```
## 0.9.3
### Patch Changes
- 795a361: The server worker url should respect a set pathPrefix.
## 0.9.2
### Patch Changes
- 5330740: When replacing images with responsive picture tags do this from the bottom up so the initial dom parsing locations still hold true.
## 0.9.1
### Patch Changes
- 43a7ca1: Responsive images need to respect a set pathPrefix
## 0.9.0 ## 0.9.0
### Minor Changes ### Minor Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@rocket/cli", "name": "@rocket/cli",
"version": "0.9.0", "version": "0.9.4",
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
@@ -67,7 +67,7 @@
"@web/dev-server": "^0.1.4", "@web/dev-server": "^0.1.4",
"@web/dev-server-rollup": "^0.3.2", "@web/dev-server-rollup": "^0.3.2",
"@web/rollup-plugin-copy": "^0.2.0", "@web/rollup-plugin-copy": "^0.2.0",
"check-html-links": "^0.2.2", "check-html-links": "^0.2.3",
"command-line-args": "^5.1.1", "command-line-args": "^5.1.1",
"command-line-usage": "^6.1.1", "command-line-usage": "^6.1.1",
"fs-extra": "^9.0.1", "fs-extra": "^9.0.1",

View File

@@ -1,5 +1,7 @@
{% set rocketServiceWorkerUrl = '/' + rocketConfig.serviceWorkerName %}
<script> <script>
window.__rocketServiceWorkerUrl = '/{{ rocketConfig.serviceWorkerName }}'; window.__rocketServiceWorkerUrl = '{{ rocketServiceWorkerUrl | url }}';
</script> </script>
<script type="module" inject-service-worker="" src="{{ '/_assets/scripts/registerServiceWorker.js' | asset | url }}"></script> <script type="module" inject-service-worker="" src="{{ '/_assets/scripts/registerServiceWorker.js' | asset | url }}"></script>

View File

@@ -50,6 +50,7 @@ export class RocketLint {
const checkLinks = new CheckHtmlLinksCli(); const checkLinks = new CheckHtmlLinksCli();
checkLinks.setOptions({ checkLinks.setOptions({
...this.config.checkLinks,
rootDir: this.config.lintInputDir, rootDir: this.config.lintInputDir,
printOnError: false, printOnError: false,
continueOnError: true, continueOnError: true,

View File

@@ -2,6 +2,7 @@
const fs = require('fs'); const fs = require('fs');
const path = require('path'); const path = require('path');
const EleventyImage = require('@11ty/eleventy-img'); const EleventyImage = require('@11ty/eleventy-img');
const urlFilter = require('@11ty/eleventy/src/Filters/Url.js');
const { SaxEventType, SAXParser } = require('sax-wasm'); const { SaxEventType, SAXParser } = require('sax-wasm');
const { getComputedConfig } = require('../public/computedConfig.cjs'); const { getComputedConfig } = require('../public/computedConfig.cjs');
@@ -82,10 +83,20 @@ function getAttributes(data) {
// return classString ? classString.split(' ') : []; // return classString ? classString.split(' ') : [];
// } // }
/**
*
* @param src {string} image src attribute value.
* @returns {boolean} true if src starts with https://, http:// or //
*/
function isExternalSrc(src) {
return /^(?:https?:)?\/\//.test(src);
}
/** /**
* @param {string} html * @param {string} html
*/ */
function getImages(html) { function getImages(html, { imagePresets }) {
/** @type {Heading[]} */ /** @type {Heading[]} */
const images = []; const images = [];
parser.eventHandler = (ev, _data) => { parser.eventHandler = (ev, _data) => {
@@ -99,16 +110,26 @@ function getImages(html) {
const src = getAttribute(data, 'src'); const src = getAttribute(data, 'src');
const title = getAttribute(data, 'title'); const title = getAttribute(data, 'title');
const alt = getAttribute(data, 'alt'); const alt = getAttribute(data, 'alt');
if (presetName) { if (presetName) {
images.push({ const presetSettings = imagePresets[presetName];
presetName, if (!presetSettings) {
attributes, throw new Error(`Could not find imagePresets: { ${presetName}: {} }`);
src, }
title, const { ignore } = presetSettings;
alt, const ignoreFn = typeof ignore === 'function' ? ignore : () => false;
openStart,
closeEnd, if (!isExternalSrc(src) && !ignoreFn({ src, title, alt, attributes })) {
}); images.push({
presetName,
attributes,
src,
title,
alt,
openStart,
closeEnd,
});
}
} }
} }
} }
@@ -140,7 +161,7 @@ async function responsiveImages(images, { inputPath, outputDir, imagePresets = {
const metadata = await EleventyImage(filePath, { const metadata = await EleventyImage(filePath, {
outputDir: path.join(outputDir, 'images'), outputDir: path.join(outputDir, 'images'),
urlPath: '/images/', urlPath: urlFilter('/images/'),
...presetSettings, ...presetSettings,
}); });
const lowsrc = metadata.jpeg[0]; const lowsrc = metadata.jpeg[0];
@@ -194,7 +215,7 @@ async function responsiveImages(images, { inputPath, outputDir, imagePresets = {
function updateHtml(html, changes) { function updateHtml(html, changes) {
let newHtml = html; let newHtml = html;
for (const change of changes) { for (const change of changes.reverse()) {
newHtml = replaceBetween({ newHtml = replaceBetween({
html: newHtml, html: newHtml,
start: change.openStart, start: change.openStart,
@@ -231,7 +252,7 @@ async function insertResponsiveImages(html) {
imagePresets: config.imagePresets, imagePresets: config.imagePresets,
}; };
let images = getImages(html); let images = getImages(html, options);
images = resolveFilePath(images, options); images = resolveFilePath(images, options);
images = await responsiveImages(images, options); images = await responsiveImages(images, options);
const newHtml = updateHtml(html, images); const newHtml = updateHtml(html, images);

View File

@@ -19,6 +19,22 @@ import { fileURLToPath } from 'url';
const __dirname = path.dirname(fileURLToPath(import.meta.url)); const __dirname = path.dirname(fileURLToPath(import.meta.url));
/**
* The default responsive ignore function will ignore files
* - ending in `.svg`
* - containing `rocket-unresponsive.`
*
* @param {object} opts
* @param {string} opts.src
* @param {string} opts.title
* @param {string} opts.alt
* @param {{name: string, value: string}[]} opts.attributes
* @returns {boolean}
*/
function ignore({ src }) {
return src.endsWith('svg') || src.includes('rocket-unresponsive.');
}
/** /**
* @param {Partial<RocketCliOptions>} inConfig * @param {Partial<RocketCliOptions>} inConfig
* @returns {Promise<RocketCliOptions>} * @returns {Promise<RocketCliOptions>}
@@ -50,6 +66,7 @@ export async function normalizeConfig(inConfig) {
widths: [600, 900, 1640], widths: [600, 900, 1640],
formats: ['avif', 'jpeg'], formats: ['avif', 'jpeg'],
sizes: '100vw', sizes: '100vw',
ignore,
}, },
}, },
}; };

View File

@@ -19,6 +19,7 @@ export function setFixtureDir(importMetaUrl) {
* @property {boolean} stripStartEndWhitespace * @property {boolean} stripStartEndWhitespace
* @property {boolean} stripScripts * @property {boolean} stripScripts
* @property {boolean} formatHtml * @property {boolean} formatHtml
* @property {boolean} replaceImageHashes
* @property {start|build} type * @property {start|build} type
*/ */
@@ -51,6 +52,7 @@ export async function readOutput(
stripScripts = false, stripScripts = false,
formatHtml = false, formatHtml = false,
type = 'build', type = 'build',
replaceImageHashes = false,
} = {}, } = {},
) { ) {
if (!cli || !cli.config) { if (!cli || !cli.config) {
@@ -70,6 +72,9 @@ export async function readOutput(
const scriptCloseTagStart = text.indexOf('</script>', scriptOpenTagEnd) + 9; const scriptCloseTagStart = text.indexOf('</script>', scriptOpenTagEnd) + 9;
text = text.substring(0, scriptOpenTagEnd) + text.substring(scriptCloseTagStart); text = text.substring(0, scriptOpenTagEnd) + text.substring(scriptCloseTagStart);
} }
if (replaceImageHashes) {
text = text.replace(/\/images\/([a-z0-9]+)-/g, '/images/__HASH__-');
}
if (formatHtml) { if (formatHtml) {
text = prettier.format(text, { parser: 'html', printWidth: 100 }); text = prettier.format(text, { parser: 'html', printWidth: 100 });
} }

View File

@@ -102,6 +102,30 @@ describe('RocketCli e2e', () => {
); );
const assetHtml = await readStartOutput(cli, 'use-assets/index.html'); const assetHtml = await readStartOutput(cli, 'use-assets/index.html');
expect(assetHtml).to.equal('<link rel="stylesheet" href="/_merged_assets/some.css">'); expect(assetHtml).to.equal('<link rel="stylesheet" href="/_merged_assets/some.css">');
const imageHtml = await readStartOutput(cli, 'image/index.html', { replaceImageHashes: true });
expect(imageHtml).to.equal(
[
'<p>',
' <figure>',
' <picture>',
'<source type="image/avif" srcset="/images/__HASH__-600.avif 600w, /images/__HASH__-900.avif 900w" sizes="100vw">',
'<source type="image/jpeg" srcset="/images/__HASH__-600.jpeg 600w, /images/__HASH__-900.jpeg 900w" sizes="100vw">',
' <img',
' alt="My Image Alternative Text" rocket-image="responsive"',
' src="/images/__HASH__-600.jpeg"',
' ',
' ',
' width="600"',
' height="316"',
' loading="lazy"',
' decoding="async"',
' />',
' </picture>',
' <figcaption>My Image Description</figcaption>',
'</figure>',
' </p>',
].join('\n'),
);
}); });
it('can add a pathPrefix that will be used in the build command', async () => { it('can add a pathPrefix that will be used in the build command', async () => {
@@ -119,6 +143,26 @@ describe('RocketCli e2e', () => {
expect(assetHtml).to.equal( expect(assetHtml).to.equal(
'<html><head><link rel="stylesheet" href="../41297ffa.css">\n\n</head><body>\n\n</body></html>', '<html><head><link rel="stylesheet" href="../41297ffa.css">\n\n</head><body>\n\n</body></html>',
); );
let imageHtml = await readBuildOutput(cli, 'image/index.html');
imageHtml = imageHtml.replace(/\.\.\/([a-z0-9]+)\./g, '../__HASH__.');
expect(imageHtml).to.equal(
[
'<html><head>',
'</head><body><p>',
' </p><figure>',
' <picture>',
'<source type="image/avif" srcset="../__HASH__.avif 600w, ../__HASH__.avif 900w" sizes="100vw">',
'<source type="image/jpeg" srcset="../__HASH__.jpeg 600w, ../__HASH__.jpeg 900w" sizes="100vw">',
' <img alt="My Image Alternative Text" rocket-image="responsive" src="../__HASH__.jpeg" width="600" height="316" loading="lazy" decoding="async">',
' </picture>',
' <figcaption>My Image Description</figcaption>',
'</figure>',
' <p></p>',
'',
'',
'</body></html>',
].join('\n'),
);
}); });
it('smoke test for link checking', async () => { it('smoke test for link checking', async () => {

View File

@@ -22,7 +22,10 @@ describe('RocketCli images', () => {
describe('Images', () => { describe('Images', () => {
it('does render content images responsive', async () => { it('does render content images responsive', async () => {
cli = await executeStart('e2e-fixtures/images/rocket.config.js'); cli = await executeStart('e2e-fixtures/images/rocket.config.js');
const indexHtml = await readStartOutput(cli, 'index.html', { formatHtml: true }); const indexHtml = await readStartOutput(cli, 'index.html', {
formatHtml: true,
replaceImageHashes: true,
});
expect(indexHtml).to.equal( expect(indexHtml).to.equal(
[ [
'<p>', '<p>',
@@ -30,18 +33,18 @@ describe('RocketCli images', () => {
' <picture>', ' <picture>',
' <source', ' <source',
' type="image/avif"', ' type="image/avif"',
' srcset="/images/d67643ad-600.avif 600w, /images/d67643ad-900.avif 900w"', ' srcset="/images/__HASH__-600.avif 600w, /images/__HASH__-900.avif 900w"',
' sizes="100vw"', ' sizes="100vw"',
' />', ' />',
' <source', ' <source',
' type="image/jpeg"', ' type="image/jpeg"',
' srcset="/images/d67643ad-600.jpeg 600w, /images/d67643ad-900.jpeg 900w"', ' srcset="/images/__HASH__-600.jpeg 600w, /images/__HASH__-900.jpeg 900w"',
' sizes="100vw"', ' sizes="100vw"',
' />', ' />',
' <img', ' <img',
' alt="My Image Alternative Text"', ' alt="My Image Alternative Text"',
' rocket-image="responsive"', ' rocket-image="responsive"',
' src="/images/d67643ad-600.jpeg"', ' src="/images/__HASH__-600.jpeg"',
' width="600"', ' width="600"',
' height="316"', ' height="316"',
' loading="lazy"', ' loading="lazy"',
@@ -53,51 +56,134 @@ describe('RocketCli images', () => {
'</p>', '</p>',
].join('\n'), ].join('\n'),
); );
});
it('renders multiple images in the correct order', async () => { const keepSvgHtml = await readStartOutput(cli, 'ignores/index.html', {
cli = await executeStart('e2e-fixtures/images/rocket.config.js'); formatHtml: true,
const indexHtml = await readStartOutput(cli, 'two-images/index.html', { formatHtml: true }); replaceImageHashes: true,
expect(indexHtml).to.equal( });
// ignores src="[...].svg" and src="[...]rocket-unresponsive.[...]"
expect(keepSvgHtml).to.equal(
[ [
'<p>Ignore SVG</p>',
'<p><img src="../_assets/logo.svg" alt="Logo stays svg" rocket-image="responsive" /></p>',
'<p>Ignore if contains <code>rocket-unresponsive.</code></p>',
'<p>',
' <img',
' src="../_assets/my-image.rocket-unresponsive.jpg"',
' alt="Logo stays svg"',
' rocket-image="responsive"',
' />',
'</p>',
'<p>Responsive</p>',
'<p>', '<p>',
' <picture>', ' <picture>',
' <source', ' <source',
' type="image/avif"', ' type="image/avif"',
' srcset="/images/d67643ad-600.avif 600w, /images/d67643ad-900.avif 900w"', ' srcset="/images/__HASH__-600.avif 600w, /images/__HASH__-900.avif 900w"',
' sizes="100vw"', ' sizes="100vw"',
' />', ' />',
' <source', ' <source',
' type="image/jpeg"', ' type="image/jpeg"',
' srcset="/images/d67643ad-600.jpeg 600w, /images/d67643ad-900.jpeg 900w"', ' srcset="/images/__HASH__-600.jpeg 600w, /images/__HASH__-900.jpeg 900w"',
' sizes="100vw"', ' sizes="100vw"',
' />', ' />',
' <img', ' <img',
' alt="one"', ' alt="My Image Alternative Text"',
' rocket-image="responsive"', ' rocket-image="responsive"',
' src="/images/d67643ad-600.jpeg"', ' src="/images/__HASH__-600.jpeg"',
' width="600"', ' width="600"',
' height="316"', ' height="316"',
' loading="lazy"', ' loading="lazy"',
' decoding="async"', ' decoding="async"',
' />', ' />',
' </picture>', ' </picture>',
'', '</p>',
].join('\n'),
);
});
it('can configure more patterns to ignore', async () => {
cli = await executeStart('e2e-fixtures/images/ignore-more.rocket.config.js');
const keepSvgHtml = await readStartOutput(cli, 'ignores/index.html', {
formatHtml: true,
replaceImageHashes: true,
});
// ignores src="[...].svg" and src="[...]rocket-unresponsive.[...]"
expect(keepSvgHtml).to.equal(
[
'<p>Ignore SVG</p>',
'<p><img src="../_assets/logo.svg" alt="Logo stays svg" rocket-image="responsive" /></p>',
'<p>Ignore if contains <code>rocket-unresponsive.</code></p>',
'<p>',
' <img',
' src="../_assets/my-image.rocket-unresponsive.jpg"',
' alt="Logo stays svg"',
' rocket-image="responsive"',
' />',
'</p>',
'<p>Responsive</p>',
'<p>',
' <img src="../_assets/my-image.jpeg" alt="My Image Alternative Text" rocket-image="responsive" />',
'</p>',
].join('\n'),
);
});
it('renders multiple images in the correct order', async () => {
cli = await executeStart('e2e-fixtures/images/rocket.config.js');
const indexHtml = await readStartOutput(cli, 'two-images/index.html', {
formatHtml: true,
replaceImageHashes: true,
});
expect(indexHtml).to.equal(
[
'<h2 id="one">',
' <a aria-hidden="true" tabindex="-1" href="#one"><span class="icon icon-link"></span></a>one',
'</h2>',
'<p>',
' <picture>', ' <picture>',
' <source', ' <source',
' type="image/avif"', ' type="image/avif"',
' srcset="/images/d67643ad-600.avif 600w, /images/d67643ad-900.avif 900w"', ' srcset="/images/__HASH__-600.avif 600w, /images/__HASH__-900.avif 900w"',
' sizes="100vw"', ' sizes="100vw"',
' />', ' />',
' <source', ' <source',
' type="image/jpeg"', ' type="image/jpeg"',
' srcset="/images/d67643ad-600.jpeg 600w, /images/d67643ad-900.jpeg 900w"', ' srcset="/images/__HASH__-600.jpeg 600w, /images/__HASH__-900.jpeg 900w"',
' sizes="100vw"',
' />',
' <img',
' alt="one"',
' rocket-image="responsive"',
' src="/images/__HASH__-600.jpeg"',
' width="600"',
' height="316"',
' loading="lazy"',
' decoding="async"',
' />',
' </picture>',
'</p>',
'<h2 id="two">',
' <a aria-hidden="true" tabindex="-1" href="#two"><span class="icon icon-link"></span></a>two',
'</h2>',
'<p>',
' <picture>',
' <source',
' type="image/avif"',
' srcset="/images/__HASH__-600.avif 600w, /images/__HASH__-900.avif 900w"',
' sizes="100vw"',
' />',
' <source',
' type="image/jpeg"',
' srcset="/images/__HASH__-600.jpeg 600w, /images/__HASH__-900.jpeg 900w"',
' sizes="100vw"', ' sizes="100vw"',
' />', ' />',
' <img', ' <img',
' alt="two"', ' alt="two"',
' rocket-image="responsive"', ' rocket-image="responsive"',
' src="/images/d67643ad-600.jpeg"', ' src="/images/__HASH__-600.jpeg"',
' width="600"', ' width="600"',
' height="316"', ' height="316"',
' loading="lazy"', ' loading="lazy"',
@@ -111,7 +197,10 @@ describe('RocketCli images', () => {
it('can configure those responsive images', async () => { it('can configure those responsive images', async () => {
cli = await executeStart('e2e-fixtures/images/small.rocket.config.js'); cli = await executeStart('e2e-fixtures/images/small.rocket.config.js');
const indexHtml = await readStartOutput(cli, 'index.html', { formatHtml: true }); const indexHtml = await readStartOutput(cli, 'index.html', {
formatHtml: true,
replaceImageHashes: true,
});
expect(indexHtml).to.equal( expect(indexHtml).to.equal(
[ [
'<p>', '<p>',
@@ -119,18 +208,18 @@ describe('RocketCli images', () => {
' <picture>', ' <picture>',
' <source', ' <source',
' type="image/avif"', ' type="image/avif"',
' srcset="/images/d67643ad-30.avif 30w, /images/d67643ad-60.avif 60w"', ' srcset="/images/__HASH__-30.avif 30w, /images/__HASH__-60.avif 60w"',
' sizes="(min-width: 1024px) 30px, 60px"', ' sizes="(min-width: 1024px) 30px, 60px"',
' />', ' />',
' <source', ' <source',
' type="image/jpeg"', ' type="image/jpeg"',
' srcset="/images/d67643ad-30.jpeg 30w, /images/d67643ad-60.jpeg 60w"', ' srcset="/images/__HASH__-30.jpeg 30w, /images/__HASH__-60.jpeg 60w"',
' sizes="(min-width: 1024px) 30px, 60px"', ' sizes="(min-width: 1024px) 30px, 60px"',
' />', ' />',
' <img', ' <img',
' alt="My Image Alternative Text"', ' alt="My Image Alternative Text"',
' rocket-image="responsive"', ' rocket-image="responsive"',
' src="/images/d67643ad-30.jpeg"', ' src="/images/__HASH__-30.jpeg"',
' width="30"', ' width="30"',
' height="15"', ' height="15"',
' loading="lazy"', ' loading="lazy"',
@@ -146,25 +235,28 @@ describe('RocketCli images', () => {
it('will only render a figure & figcaption if there is a caption/title', async () => { it('will only render a figure & figcaption if there is a caption/title', async () => {
cli = await executeStart('e2e-fixtures/images/small.rocket.config.js'); cli = await executeStart('e2e-fixtures/images/small.rocket.config.js');
const indexHtml = await readStartOutput(cli, 'no-title/index.html', { formatHtml: true }); const indexHtml = await readStartOutput(cli, 'no-title/index.html', {
formatHtml: true,
replaceImageHashes: true,
});
expect(indexHtml).to.equal( expect(indexHtml).to.equal(
[ [
'<p>', '<p>',
' <picture>', ' <picture>',
' <source', ' <source',
' type="image/avif"', ' type="image/avif"',
' srcset="/images/d67643ad-30.avif 30w, /images/d67643ad-60.avif 60w"', ' srcset="/images/__HASH__-30.avif 30w, /images/__HASH__-60.avif 60w"',
' sizes="(min-width: 1024px) 30px, 60px"', ' sizes="(min-width: 1024px) 30px, 60px"',
' />', ' />',
' <source', ' <source',
' type="image/jpeg"', ' type="image/jpeg"',
' srcset="/images/d67643ad-30.jpeg 30w, /images/d67643ad-60.jpeg 60w"', ' srcset="/images/__HASH__-30.jpeg 30w, /images/__HASH__-60.jpeg 60w"',
' sizes="(min-width: 1024px) 30px, 60px"', ' sizes="(min-width: 1024px) 30px, 60px"',
' />', ' />',
' <img', ' <img',
' alt="My Image Alternative Text"', ' alt="My Image Alternative Text"',
' rocket-image="responsive"', ' rocket-image="responsive"',
' src="/images/d67643ad-30.jpeg"', ' src="/images/__HASH__-30.jpeg"',
' width="30"', ' width="30"',
' height="15"', ' height="15"',
' loading="lazy"', ' loading="lazy"',
@@ -178,15 +270,18 @@ describe('RocketCli images', () => {
it('will render an img with srcset and sizes if there is only one image format', async () => { it('will render an img with srcset and sizes if there is only one image format', async () => {
cli = await executeStart('e2e-fixtures/images/single-format.rocket.config.js'); cli = await executeStart('e2e-fixtures/images/single-format.rocket.config.js');
const indexHtml = await readStartOutput(cli, 'no-title/index.html', { formatHtml: true }); const indexHtml = await readStartOutput(cli, 'no-title/index.html', {
formatHtml: true,
replaceImageHashes: true,
});
expect(indexHtml).to.equal( expect(indexHtml).to.equal(
[ [
'<p>', '<p>',
' <img', ' <img',
' alt="My Image Alternative Text"', ' alt="My Image Alternative Text"',
' rocket-image="responsive"', ' rocket-image="responsive"',
' src="/images/d67643ad-30.jpeg"', ' src="/images/__HASH__-30.jpeg"',
' srcset="/images/d67643ad-30.jpeg 30w, /images/d67643ad-60.jpeg 60w"', ' srcset="/images/__HASH__-30.jpeg 30w, /images/__HASH__-60.jpeg 60w"',
' sizes="(min-width: 1024px) 30px, 60px"', ' sizes="(min-width: 1024px) 30px, 60px"',
' width="30"', ' width="30"',
' height="15"', ' height="15"',

View File

@@ -108,15 +108,18 @@ describe('RocketCli preset', () => {
it('a preset can provide an adjustImagePresets() function', async () => { it('a preset can provide an adjustImagePresets() function', async () => {
cli = await executeStart('preset-fixtures/use-preset/rocket.config.js'); cli = await executeStart('preset-fixtures/use-preset/rocket.config.js');
const indexHtml = await readStartOutput(cli, 'index.html', { formatHtml: true }); const indexHtml = await readStartOutput(cli, 'index.html', {
formatHtml: true,
replaceImageHashes: true,
});
expect(indexHtml).to.equal( expect(indexHtml).to.equal(
[ [
'<p>', '<p>',
' <img', ' <img',
' alt="My Image Alternative Text"', ' alt="My Image Alternative Text"',
' rocket-image="responsive"', ' rocket-image="responsive"',
' src="/images/1f847765-30.jpeg"', ' src="/images/__HASH__-30.jpeg"',
' srcset="/images/1f847765-30.jpeg 30w, /images/1f847765-60.jpeg 60w"', ' srcset="/images/__HASH__-30.jpeg 30w, /images/__HASH__-60.jpeg 60w"',
' sizes="30px"', ' sizes="30px"',
' width="30"', ' width="30"',
' height="15"', ' height="15"',

View File

@@ -0,0 +1,66 @@
import chai from 'chai';
import chalk from 'chalk';
import { executeBuild, readStartOutput, setFixtureDir } from '@rocket/cli/test-helpers';
const { expect } = chai;
function getInjectServiceWorker(text) {
const scriptOpenTagStart = text.indexOf('<script type="module" inject-service-worker=""');
const scriptCloseTagEnd = text.indexOf('</script>', scriptOpenTagStart) + 9;
text = text.substring(scriptOpenTagStart, scriptCloseTagEnd);
return text;
}
function getServiceWorkerUrl(text) {
const matches = text.match(/window\.__rocketServiceWorkerUrl = '(.*?)';/);
return matches[1];
}
describe('RocketCli e2e', () => {
let cli;
before(() => {
// ignore colors in tests as most CIs won't support it
chalk.level = 0;
setFixtureDir(import.meta.url);
});
afterEach(async () => {
if (cli?.cleanup) {
await cli.cleanup();
}
});
it('will add a script to inject the service worker', async () => {
cli = await executeBuild('e2e-fixtures/service-worker/rocket.config.js');
const indexHtml = await readStartOutput(cli, 'index.html');
const indexInject = getInjectServiceWorker(indexHtml);
expect(indexInject).to.equal(
'<script type="module" inject-service-worker="" src="/_merged_assets/scripts/registerServiceWorker.js"></script>',
);
expect(getServiceWorkerUrl(indexHtml)).to.equal('/service-worker.js');
const subHtml = await readStartOutput(cli, 'sub/index.html');
const subInject = getInjectServiceWorker(subHtml);
expect(subInject).to.equal(
'<script type="module" inject-service-worker="" src="/_merged_assets/scripts/registerServiceWorker.js"></script>',
);
expect(getServiceWorkerUrl(subHtml)).to.equal('/service-worker.js');
});
// TODO: find a way to run these test either by forcing pathPrefix in start or skipping asset gathering for build or ...
it.skip('will add a script to inject the service worker', async () => {
cli = await executeBuild('e2e-fixtures/service-worker/pathPrefix.rocket.config.js');
const indexHtml = await readStartOutput(cli, 'index.html');
const indexInject = getInjectServiceWorker(indexHtml);
expect(indexInject).to.equal(
'<script type="module" inject-service-worker="" src="/my-prefix-folder/_merged_assets/scripts/registerServiceWorker.js"></script>',
);
expect(getServiceWorkerUrl(indexHtml)).to.equal('/my-prefix-folder/service-worker.js');
const subHtml = await readStartOutput(cli, 'sub/index.html');
const subInject = getInjectServiceWorker(subHtml);
expect(subInject).to.equal(
'<script type="module" inject-service-worker="" src="/my-prefix-folder/_merged_assets/scripts/registerServiceWorker.js"></script>',
);
expect(getServiceWorkerUrl(subHtml)).to.equal('/my-prefix-folder/service-worker.js');
});
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

View File

@@ -0,0 +1,5 @@
---
layout: layout-raw
---
![My Image Alternative Text](./_assets/my-image.jpg 'My Image Description')

View File

@@ -0,0 +1,33 @@
<svg fill="#e63946" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 511.998 511.998" xml:space="preserve">
<g>
<path d="M98.649,430.256c-46.365,28.67-71.17,30.939-78.916,23.51c-7.75-7.433-6.519-32.307,20.182-79.832
c24.953-44.412,65.374-96.693,113.818-147.211l-11.279-10.817C93.124,267.348,51.871,320.751,26.291,366.279
c-19.228,34.22-37.848,79.134-17.375,98.766c5.84,5.6,13.599,7.935,22.484,7.935c22.269,0,51.606-14.677,75.469-29.432
c44.416-27.464,96.044-70.919,145.373-122.362l-11.279-10.817C192.517,360.888,141.976,403.464,98.649,430.256z"/>
<rect x="238.112" y="272.64" transform="matrix(-0.7218 -0.6921 0.6921 -0.7218 237.9094 656.5383)" width="25.589" height="15.628"/>
<rect x="268.895" y="302.163" transform="matrix(-0.7218 -0.6921 0.6921 -0.7218 270.4774 728.6761)" width="25.589" height="15.628"/>
<rect x="232.827" y="268.929" transform="matrix(-0.7218 -0.6921 0.6921 -0.7218 297.4719 673.0591)" width="102.364" height="15.628"/>
<path d="M500.916,41.287c-7.769,1.59-76.412,16.062-93.897,34.294l-50.728,52.899l-114.703-3.629l-39.198,40.876l79.28,40.569
l-21.755,22.687l72.848,69.858l21.755-22.687l43.857,77.51l39.197-40.876l-8.433-114.451l50.727-52.899
c17.485-18.234,29.067-87.422,30.331-95.251l1.801-11.169L500.916,41.287z M228.209,161.383l19.842-20.692l93.688,2.964
l-48.775,50.864L228.209,161.383z M401.632,327.686l-35.822-63.308l48.776-50.865l6.886,93.482L401.632,327.686z
M332.298,276.743l-50.287-48.223L412.89,92.037l50.288,48.223L332.298,276.743z M473.009,128.036l-48.316-46.334
c14.54-8.427,44.787-17.217,68.076-22.632C488.336,82.567,480.82,113.155,473.009,128.036z"/>
<rect x="302.369" y="231.988" transform="matrix(-0.7218 -0.6921 0.6921 -0.7218 384.0262 633.9694)" width="34.12" height="15.628"/>
<rect x="411.311" y="127.35" transform="matrix(-0.6921 0.7218 -0.7218 -0.6921 807.9747 -74.331)" width="17.061" height="15.628"/>
<rect x="394.288" y="145.087" transform="matrix(-0.7218 -0.6921 0.6921 -0.7218 586.0206 542.7934)" width="15.628" height="17.06"/>
<rect x="376.571" y="163.565" transform="matrix(-0.7218 -0.6921 0.6921 -0.7218 542.7271 562.3462)" width="15.628" height="17.06"/>
<rect x="161.111" y="185.158" transform="matrix(0.7071 0.7071 -0.7071 0.7071 192.1943 -60.3323)" width="15.628" height="33.35"/>
<rect x="184.683" y="172.695" transform="matrix(0.707 0.7072 -0.7072 0.707 182.4625 -83.9076)" width="15.628" height="11.118"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

View File

@@ -0,0 +1,15 @@
---
layout: layout-raw
---
Ignore SVG
![Logo stays svg](./_assets/logo.svg)
Ignore if contains `rocket-unresponsive.`
![Logo stays svg](./_assets/my-image.rocket-unresponsive.jpg)
Responsive
![My Image Alternative Text](./_assets/my-image.jpeg)

View File

@@ -2,4 +2,10 @@
layout: layout-raw layout: layout-raw
--- ---
![one](./_assets/my-image.jpg)![two](./_assets/my-image.jpg) ## one
![one](./_assets/my-image.jpg)
## two
![two](./_assets/my-image.jpg)

View File

@@ -0,0 +1,10 @@
/** @type {Partial<import("../../../types/main").RocketCliOptions>} */
const config = {
imagePresets: {
responsive: {
ignore: ({ src }) =>
src.endsWith('.jpeg') || src.endsWith('svg') || src.includes('rocket-unresponsive.'),
},
},
};
export default config;

View File

@@ -0,0 +1 @@
**/*.njk

View File

@@ -0,0 +1 @@
module.exports = 'https://example.com';

View File

@@ -0,0 +1,5 @@
---
layout: layout-default
---
Content inside `docs/index.md`

View File

@@ -0,0 +1,5 @@
---
layout: layout-default
---
Content inside `docs/sub.md`

View File

@@ -0,0 +1,6 @@
/** @type {Partial<import("../../../types/main").RocketCliOptions>} */
const config = {
pathPrefix: '/my-prefix-folder/',
};
export default config;

View File

@@ -0,0 +1,3 @@
/** @type {Partial<import("../../../types/main").RocketCliOptions>} */
const config = {};
export default config;

View File

@@ -13,6 +13,7 @@ function cleanup(config) {
delete configNoPaths._presetPathes; delete configNoPaths._presetPathes;
delete configNoPaths.eleventy; delete configNoPaths.eleventy;
delete configNoPaths.outputDevDir; delete configNoPaths.outputDevDir;
delete configNoPaths.imagePresets.responsive.ignore;
return configNoPaths; return configNoPaths;
} }

View File

@@ -1,4 +1,5 @@
import { DevServerConfig } from '@web/dev-server'; import { DevServerConfig } from '@web/dev-server';
import { CheckHtmlLinksCliOptions } from 'check-html-links/dist-types/types/main';
export interface RocketPreset { export interface RocketPreset {
path: string; path: string;
@@ -39,6 +40,8 @@ export interface RocketCliOptions {
[key: string]: ImagePreset; [key: string]: ImagePreset;
}; };
checkLinks: Partial<CheckHtmlLinksCliOptions>;
start?: RocketStartConfig; start?: RocketStartConfig;
// TODO: improve all setup functions // TODO: improve all setup functions

View File

@@ -1,5 +1,12 @@
# @rocket/launch # @rocket/launch
## 0.5.1
### Patch Changes
- cf44221: Adds a Slack invite to social links
- f5d349e: add used fonts from google fonts
## 0.5.0 ## 0.5.0
### Minor Changes ### Minor Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@rocket/launch", "name": "@rocket/launch",
"version": "0.5.0", "version": "0.5.1",
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },

View File

@@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 123 123" fill="currentColor">
<title>Slack</title>
<path stroke="none" stroke-width="1" stroke-dasharray="none" stroke-linecap="butt" stroke-dashoffset="0" stroke-linejoin="miter" stroke-miterlimit="4" fill-rule="nonzero"
d="M26.4 78.2c0 7.1-5.8 12.9-12.9 12.9S.6 85.3.6 78.2c0-7.1 5.8-12.9 12.9-12.9h12.9v12.9zm6.5 0c0-7.1 5.8-12.9 12.9-12.9s12.9 5.8 12.9 12.9v32.3c0 7.1-5.8 12.9-12.9 12.9s-12.9-5.8-12.9-12.9V78.2zm12.9-51.8c-7.1 0-12.9-5.8-12.9-12.9S38.7.6 45.8.6s12.9 5.8 12.9 12.9v12.9H45.8zm0 6.5c7.1 0 12.9 5.8 12.9 12.9s-5.8 12.9-12.9 12.9H13.5C6.4 58.7.6 52.9.6 45.8s5.8-12.9 12.9-12.9h32.3zM97.6 45.8c0-7.1 5.8-12.9 12.9-12.9 7.1 0 12.9 5.8 12.9 12.9s-5.8 12.9-12.9 12.9H97.6V45.8zm-6.5 0c0 7.1-5.8 12.9-12.9 12.9-7.1 0-12.9-5.8-12.9-12.9V13.5C65.3 6.4 71.1.6 78.2.6c7.1 0 12.9 5.8 12.9 12.9v32.3zM78.2 97.6c7.1 0 12.9 5.8 12.9 12.9 0 7.1-5.8 12.9-12.9 12.9-7.1 0-12.9-5.8-12.9-12.9V97.6h12.9zm0-6.5c-7.1 0-12.9-5.8-12.9-12.9 0-7.1 5.8-12.9 12.9-12.9h32.3c7.1 0 12.9 5.8 12.9 12.9 0 7.1-5.8 12.9-12.9 12.9H78.2z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -213,6 +213,14 @@ body[layout^='layout-home'] #main-header a:hover {
margin-right: 50px; margin-right: 50px;
} }
#main-header .content-area > .social-link {
margin-right: 15px;
}
#main-header .content-area > *:last-child {
margin-right: 0;
}
#main-header .search { #main-header .search {
order: 1; order: 1;
} }

View File

@@ -9,6 +9,11 @@ module.exports = function () {
name: 'GitHub', name: 'GitHub',
url: 'https://github.com/modernweb-dev/rocket', url: 'https://github.com/modernweb-dev/rocket',
}, },
{
name: 'Slack',
url:
'https://join.slack.com/t/lit-and-friends/shared_invite/zt-llwznvsy-LZwT13R66gOgnrg12PUGqw',
},
], ],
gitSiteUrl: 'https://github.com/modernweb-dev/rocket', gitSiteUrl: 'https://github.com/modernweb-dev/rocket',
gitBranch: 'master', gitBranch: 'master',

View File

@@ -0,0 +1,10 @@
<link rel="preconnect" href="https://fonts.googleapis.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&amp;display=optional"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&amp;display=optional"
rel="stylesheet"
/>

View File

@@ -83,6 +83,17 @@ describe('RocketLaunch preset', () => {
'', '',
' <meta name="twitter:card" content="summary_large_image" />', ' <meta name="twitter:card" content="summary_large_image" />',
'', '',
' <link rel="preconnect" href="https://fonts.googleapis.com" crossorigin />',
'',
' <link',
' href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&amp;display=optional"',
' rel="stylesheet"',
' />',
' <link',
' href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&amp;display=optional"',
' rel="stylesheet"',
' />',
'',
' <link rel="stylesheet" href="/_merged_assets/variables.css" />', ' <link rel="stylesheet" href="/_merged_assets/variables.css" />',
' <link rel="stylesheet" href="/_merged_assets/layout.css" />', ' <link rel="stylesheet" href="/_merged_assets/layout.css" />',
' <link rel="stylesheet" href="/_merged_assets/markdown.css" />', ' <link rel="stylesheet" href="/_merged_assets/markdown.css" />',
@@ -138,6 +149,30 @@ describe('RocketLaunch preset', () => {
' ></path>', ' ></path>',
' </svg>', ' </svg>',
' </a>', ' </a>',
' <a',
' class="social-link"',
' href="https://join.slack.com/t/lit-and-friends/shared_invite/zt-llwznvsy-LZwT13R66gOgnrg12PUGqw"',
' aria-label="Rocket on Slack"',
' rel="noopener noreferrer"',
' target="_blank"',
' >',
' <span class="sr-only">Slack</span>',
'',
' <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 123 123" fill="currentColor">',
' <title>Slack</title>',
' <path',
' stroke="none"',
' stroke-width="1"',
' stroke-dasharray="none"',
' stroke-linecap="butt"',
' stroke-dashoffset="0"',
' stroke-linejoin="miter"',
' stroke-miterlimit="4"',
' fill-rule="nonzero"',
' d="M26.4 78.2c0 7.1-5.8 12.9-12.9 12.9S.6 85.3.6 78.2c0-7.1 5.8-12.9 12.9-12.9h12.9v12.9zm6.5 0c0-7.1 5.8-12.9 12.9-12.9s12.9 5.8 12.9 12.9v32.3c0 7.1-5.8 12.9-12.9 12.9s-12.9-5.8-12.9-12.9V78.2zm12.9-51.8c-7.1 0-12.9-5.8-12.9-12.9S38.7.6 45.8.6s12.9 5.8 12.9 12.9v12.9H45.8zm0 6.5c7.1 0 12.9 5.8 12.9 12.9s-5.8 12.9-12.9 12.9H13.5C6.4 58.7.6 52.9.6 45.8s5.8-12.9 12.9-12.9h32.3zM97.6 45.8c0-7.1 5.8-12.9 12.9-12.9 7.1 0 12.9 5.8 12.9 12.9s-5.8 12.9-12.9 12.9H97.6V45.8zm-6.5 0c0 7.1-5.8 12.9-12.9 12.9-7.1 0-12.9-5.8-12.9-12.9V13.5C65.3 6.4 71.1.6 78.2.6c7.1 0 12.9 5.8 12.9 12.9v32.3zM78.2 97.6c7.1 0 12.9 5.8 12.9 12.9 0 7.1-5.8 12.9-12.9 12.9-7.1 0-12.9-5.8-12.9-12.9V97.6h12.9zm0-6.5c-7.1 0-12.9-5.8-12.9-12.9 0-7.1 5.8-12.9 12.9-12.9h32.3c7.1 0 12.9 5.8 12.9 12.9 0 7.1-5.8 12.9-12.9 12.9H78.2z"',
' />',
' </svg>',
' </a>',
' </div>', ' </div>',
' </header>', ' </header>',
'', '',
@@ -285,6 +320,17 @@ describe('RocketLaunch preset', () => {
'', '',
' <meta name="twitter:card" content="summary_large_image" />', ' <meta name="twitter:card" content="summary_large_image" />',
'', '',
' <link rel="preconnect" href="https://fonts.googleapis.com" crossorigin />',
'',
' <link',
' href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&amp;display=optional"',
' rel="stylesheet"',
' />',
' <link',
' href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&amp;display=optional"',
' rel="stylesheet"',
' />',
'',
' <link rel="stylesheet" href="/_merged_assets/variables.css" />', ' <link rel="stylesheet" href="/_merged_assets/variables.css" />',
' <link rel="stylesheet" href="/_merged_assets/layout.css" />', ' <link rel="stylesheet" href="/_merged_assets/layout.css" />',
' <link rel="stylesheet" href="/_merged_assets/markdown.css" />', ' <link rel="stylesheet" href="/_merged_assets/markdown.css" />',
@@ -340,6 +386,30 @@ describe('RocketLaunch preset', () => {
' ></path>', ' ></path>',
' </svg>', ' </svg>',
' </a>', ' </a>',
' <a',
' class="social-link"',
' href="https://join.slack.com/t/lit-and-friends/shared_invite/zt-llwznvsy-LZwT13R66gOgnrg12PUGqw"',
' aria-label="Rocket on Slack"',
' rel="noopener noreferrer"',
' target="_blank"',
' >',
' <span class="sr-only">Slack</span>',
'',
' <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 123 123" fill="currentColor">',
' <title>Slack</title>',
' <path',
' stroke="none"',
' stroke-width="1"',
' stroke-dasharray="none"',
' stroke-linecap="butt"',
' stroke-dashoffset="0"',
' stroke-linejoin="miter"',
' stroke-miterlimit="4"',
' fill-rule="nonzero"',
' d="M26.4 78.2c0 7.1-5.8 12.9-12.9 12.9S.6 85.3.6 78.2c0-7.1 5.8-12.9 12.9-12.9h12.9v12.9zm6.5 0c0-7.1 5.8-12.9 12.9-12.9s12.9 5.8 12.9 12.9v32.3c0 7.1-5.8 12.9-12.9 12.9s-12.9-5.8-12.9-12.9V78.2zm12.9-51.8c-7.1 0-12.9-5.8-12.9-12.9S38.7.6 45.8.6s12.9 5.8 12.9 12.9v12.9H45.8zm0 6.5c7.1 0 12.9 5.8 12.9 12.9s-5.8 12.9-12.9 12.9H13.5C6.4 58.7.6 52.9.6 45.8s5.8-12.9 12.9-12.9h32.3zM97.6 45.8c0-7.1 5.8-12.9 12.9-12.9 7.1 0 12.9 5.8 12.9 12.9s-5.8 12.9-12.9 12.9H97.6V45.8zm-6.5 0c0 7.1-5.8 12.9-12.9 12.9-7.1 0-12.9-5.8-12.9-12.9V13.5C65.3 6.4 71.1.6 78.2.6c7.1 0 12.9 5.8 12.9 12.9v32.3zM78.2 97.6c7.1 0 12.9 5.8 12.9 12.9 0 7.1-5.8 12.9-12.9 12.9-7.1 0-12.9-5.8-12.9-12.9V97.6h12.9zm0-6.5c-7.1 0-12.9-5.8-12.9-12.9 0-7.1 5.8-12.9 12.9-12.9h32.3c7.1 0 12.9 5.8 12.9 12.9 0 7.1-5.8 12.9-12.9 12.9H78.2z"',
' />',
' </svg>',
' </a>',
' </div>', ' </div>',
' </header>', ' </header>',
'', '',

View File

@@ -1,5 +1,11 @@
# @rocket/search # @rocket/search
## 0.4.0
### Minor Changes
- 6cabdba: BREAKING: upgraded search to lit version 2
## 0.3.5 ## 0.3.5
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@rocket/search", "name": "@rocket/search",
"version": "0.3.5", "version": "0.4.0",
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
@@ -41,8 +41,10 @@
"search" "search"
], ],
"dependencies": { "dependencies": {
"@lion/combobox": "^0.5.1", "@lion/combobox": "^0.8.0",
"@open-wc/scoped-elements": "^1.3.2", "@lion/core": "^0.18.0",
"@lion/listbox": "^0.10.1",
"@open-wc/scoped-elements": "^2.0.0-next.3",
"chalk": "^4.0.0", "chalk": "^4.0.0",
"minisearch": "^3.0.2", "minisearch": "^3.0.2",
"plugins-manager": "^0.2.2", "plugins-manager": "^0.2.2",

View File

@@ -1,7 +1,6 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */ /* eslint-disable @typescript-eslint/ban-ts-comment */
import { html, LitElement, css } from 'lit-element'; import { html, LitElement, css, repeat } from '@lion/core';
import MiniSearch from 'minisearch'; import MiniSearch from 'minisearch';
import { repeat } from 'lit-html/directives/repeat.js';
import { ScopedElementsMixin } from '@open-wc/scoped-elements'; import { ScopedElementsMixin } from '@open-wc/scoped-elements';
import { RocketSearchCombobox } from './RocketSearchCombobox.js'; import { RocketSearchCombobox } from './RocketSearchCombobox.js';
import { RocketSearchOption } from './RocketSearchOption.js'; import { RocketSearchOption } from './RocketSearchOption.js';
@@ -94,7 +93,7 @@ export class RocketSearch extends ScopedElementsMixin(LitElement) {
} }
get combobox() { get combobox() {
return this.shadowRoot?.children[0]; return this.shadowRoot.querySelector('rocket-search-combobox');
} }
/** @param {import('lit-element').PropertyValues } changedProperties */ /** @param {import('lit-element').PropertyValues } changedProperties */

View File

@@ -1,4 +1,5 @@
import { expect, fixture as _fixture, html } from '@open-wc/testing'; import { expect, fixture as _fixture } from '@open-wc/testing';
import { html } from 'lit/static-html.js';
import { setViewport } from '@web/test-runner-commands'; import { setViewport } from '@web/test-runner-commands';
import { stubMethod } from 'hanbi'; import { stubMethod } from 'hanbi';

View File

@@ -25,6 +25,7 @@ const config = {
}), }),
], ],
// serviceWorkerName: 'sw.js', // serviceWorkerName: 'sw.js',
// pathPrefix: '/_site/',
// emptyOutputDir: false, // emptyOutputDir: false,
}; };

118
yarn.lock
View File

@@ -1110,15 +1110,15 @@
dependencies: dependencies:
"@lion/core" "0.16.0" "@lion/core" "0.16.0"
"@lion/combobox@^0.5.1": "@lion/combobox@^0.8.0":
version "0.5.1" version "0.8.0"
resolved "https://registry.yarnpkg.com/@lion/combobox/-/combobox-0.5.1.tgz#6395d5c34f0935aee32034584a253c1a2c6fa717" resolved "https://registry.yarnpkg.com/@lion/combobox/-/combobox-0.8.0.tgz#ef60cfcfa55b659033900615efb207dd80708320"
integrity sha512-sOpJLCH8pzZAOohrqVnlTjC7L93tavXugSV2SqhVsFFnSQIWXytaeL8eJPlVBrTrmcOpns6AQX2uyBbeY6ZTsg== integrity sha512-qjudhZ/UAbvPjJavWT/VZt9t76Xa0MFaqRnmX7Ga0acJhm29vtMi4r5BqniF/JfCucXz5ya3oFYNqxkOQcWReA==
dependencies: dependencies:
"@lion/core" "0.16.0" "@lion/core" "0.18.0"
"@lion/form-core" "0.11.0" "@lion/form-core" "0.14.1"
"@lion/listbox" "0.7.0" "@lion/listbox" "0.10.1"
"@lion/overlays" "0.26.1" "@lion/overlays" "0.28.1"
"@lion/core@0.16.0": "@lion/core@0.16.0":
version "0.16.0" version "0.16.0"
@@ -1130,32 +1130,50 @@
lit-element "~2.4.0" lit-element "~2.4.0"
lit-html "^1.3.0" lit-html "^1.3.0"
"@lion/form-core@0.11.0": "@lion/core@0.18.0", "@lion/core@^0.18.0":
version "0.11.0"
resolved "https://registry.yarnpkg.com/@lion/form-core/-/form-core-0.11.0.tgz#83985baba62e11082b42ea84f3683f72a8f36fcf"
integrity sha512-opDXzTtVHJlRo+BLSI0dtSjbIz7PsJL80wnU8WAK3S+WNH5z2S37OBCoVvOVpXRpoqGAj5L/BmaJnHZeo6pPYw==
dependencies:
"@lion/core" "0.16.0"
"@lion/localize" "0.18.0"
"@lion/listbox@0.7.0":
version "0.7.0"
resolved "https://registry.yarnpkg.com/@lion/listbox/-/listbox-0.7.0.tgz#bd1d8cb25098387fd0ae1087f8dd641510f741f0"
integrity sha512-wHGqahRIjpTmMAvU/hDZyDGNhmjRj6FEYSWn7Z3ugE52D9a1PQd7HVc1cVVIRc71jC3w4n5ZYVeZChwR3N3fWw==
dependencies:
"@lion/core" "0.16.0"
"@lion/form-core" "0.11.0"
"@lion/localize@0.18.0":
version "0.18.0" version "0.18.0"
resolved "https://registry.yarnpkg.com/@lion/localize/-/localize-0.18.0.tgz#beaf8c161feb58ecab670892c06e7b524527b7e8" resolved "https://registry.yarnpkg.com/@lion/core/-/core-0.18.0.tgz#475b872407829ab7860f50ff771c2e5ee957b204"
integrity sha512-+adOGlot4IItOy1udLKflZlO2fTKM7R0Ji7iZ5SEVG80XOZxC3RXjVM7mWSd5wqcCUe51j1P/tgKM3vDLF0RAw== integrity sha512-tfSKvd/YvGY8JPqb3Nv4TV85nzgeXOxXfnnNVpAGGC0yoRK9jKR4FvRdqDROenbPsfPOVz9+uL/2fd+GJl6qKg==
dependencies:
"@open-wc/dedupe-mixin" "^1.2.18"
"@open-wc/scoped-elements" "^2.0.0-next.3"
lit "^2.0.0-rc.2"
"@lion/form-core@0.14.1":
version "0.14.1"
resolved "https://registry.yarnpkg.com/@lion/form-core/-/form-core-0.14.1.tgz#404e047e32ea56ae5318db6444809cf83089d5f3"
integrity sha512-WQQASer/vv0dyaxdp4nK2M+SqosCdk2JIyvShMmo9aqsTtUlKfyof/JszHj1e5pkydGHqC4x7ehN3gx4UiDk2g==
dependencies:
"@lion/core" "0.18.0"
"@lion/localize" "0.20.1"
"@lion/listbox@0.10.1", "@lion/listbox@^0.10.1":
version "0.10.1"
resolved "https://registry.yarnpkg.com/@lion/listbox/-/listbox-0.10.1.tgz#c6a6e4cebc4f76386c1261faf582c46e58f41a37"
integrity sha512-WrQ1/BiaEo3TBAQgFuRxqHTYlhLD4BZxp73Itlf9ooH6p/NlRsYKlppPfzWmhtoc7uJRbc9PDoo2krxvMFKxfA==
dependencies:
"@lion/core" "0.18.0"
"@lion/form-core" "0.14.1"
"@lion/localize@0.20.1":
version "0.20.1"
resolved "https://registry.yarnpkg.com/@lion/localize/-/localize-0.20.1.tgz#92b3e795b1cec1cffeac8e54ed9a19ad6fc934fc"
integrity sha512-su55r7wsNAYUl0s5J2ySv6KThIKAXt76nA/6OkCFGTS5e4LClCenqvK6jrhpGQKZ29I4OW4XQMFXTu/XlaKNMQ==
dependencies: dependencies:
"@bundled-es-modules/message-format" "6.0.4" "@bundled-es-modules/message-format" "6.0.4"
"@lion/core" "0.16.0" "@lion/core" "0.18.0"
singleton-manager "1.4.1" singleton-manager "1.4.2"
"@lion/overlays@0.26.1", "@lion/overlays@^0.26.1": "@lion/overlays@0.28.1":
version "0.28.1"
resolved "https://registry.yarnpkg.com/@lion/overlays/-/overlays-0.28.1.tgz#08f0d781a45208c7beef2730c66f42b571d49ab8"
integrity sha512-MiEkGtPIUHewGqay3VI++S6UXcTrSLt2Or0RxYFZfS64PIPMRPmKKsyW8xiouuKXWGV7vafP7apAauP8CxaY+g==
dependencies:
"@lion/core" "0.18.0"
"@popperjs/core" "^2.5.4"
singleton-manager "1.4.2"
"@lion/overlays@^0.26.1":
version "0.26.1" version "0.26.1"
resolved "https://registry.yarnpkg.com/@lion/overlays/-/overlays-0.26.1.tgz#d1bfa4f5f97108982afa7b409ba4300f8b2d2ba5" resolved "https://registry.yarnpkg.com/@lion/overlays/-/overlays-0.26.1.tgz#d1bfa4f5f97108982afa7b409ba4300f8b2d2ba5"
integrity sha512-1FvphbR/yTQ1WtcB1gNuH772i9qAydQkI6NwibIw8QeOGXisA+6SChv2OHS7CijlpDJnDxNyX44LGdDM1/Pd8A== integrity sha512-1FvphbR/yTQ1WtcB1gNuH772i9qAydQkI6NwibIw8QeOGXisA+6SChv2OHS7CijlpDJnDxNyX44LGdDM1/Pd8A==
@@ -1224,14 +1242,6 @@
resolved "https://registry.yarnpkg.com/@open-wc/dedupe-mixin/-/dedupe-mixin-1.3.0.tgz#0df5d438285fc3482838786ee81895318f0ff778" resolved "https://registry.yarnpkg.com/@open-wc/dedupe-mixin/-/dedupe-mixin-1.3.0.tgz#0df5d438285fc3482838786ee81895318f0ff778"
integrity sha512-UfdK1MPnR6T7f3svzzYBfu3qBkkZ/KsPhcpc3JYhsUY4hbpwNF9wEQtD4Z+/mRqMTJrKg++YSxIxE0FBhY3RIw== integrity sha512-UfdK1MPnR6T7f3svzzYBfu3qBkkZ/KsPhcpc3JYhsUY4hbpwNF9wEQtD4Z+/mRqMTJrKg++YSxIxE0FBhY3RIw==
"@open-wc/scoped-elements@^1.3.2":
version "1.3.2"
resolved "https://registry.yarnpkg.com/@open-wc/scoped-elements/-/scoped-elements-1.3.2.tgz#6ae54c49731bbe8c3e0b5383c989f983dcdfacf5"
integrity sha512-DoP3XA8r03tGx+IrlJwP/voLuDFkyS56kvwhmXIhpESo7M5jMt5e0zScNrawj7EMe4b5gDaJjorx2Jza8FLaLw==
dependencies:
"@open-wc/dedupe-mixin" "^1.3.0"
lit-html "^1.0.0"
"@open-wc/scoped-elements@^1.3.3": "@open-wc/scoped-elements@^1.3.3":
version "1.3.3" version "1.3.3"
resolved "https://registry.yarnpkg.com/@open-wc/scoped-elements/-/scoped-elements-1.3.3.tgz#fe008aef4d74fb00c553c900602960638fc1c7b0" resolved "https://registry.yarnpkg.com/@open-wc/scoped-elements/-/scoped-elements-1.3.3.tgz#fe008aef4d74fb00c553c900602960638fc1c7b0"
@@ -1249,6 +1259,15 @@
"@open-wc/dedupe-mixin" "^1.3.0" "@open-wc/dedupe-mixin" "^1.3.0"
"@webcomponents/scoped-custom-element-registry" "0.0.1" "@webcomponents/scoped-custom-element-registry" "0.0.1"
"@open-wc/scoped-elements@^2.0.0-next.3":
version "2.0.0-next.4"
resolved "https://registry.yarnpkg.com/@open-wc/scoped-elements/-/scoped-elements-2.0.0-next.4.tgz#d8294358e3e8ad2ba44200ab805549fde49245f6"
integrity sha512-BMd5n5BHLi3FBhwhPbBuN7pZdi8I1CIQn10aKLZtg9aplVhN2BG1rwr0ANebXJ6fdq8m1PE1wQAaCXYCcEBTEQ==
dependencies:
"@lit/reactive-element" "^1.0.0-rc.1"
"@open-wc/dedupe-mixin" "^1.3.0"
"@webcomponents/scoped-custom-element-registry" "0.0.2"
"@open-wc/semantic-dom-diff@^0.13.16": "@open-wc/semantic-dom-diff@^0.13.16":
version "0.13.21" version "0.13.21"
resolved "https://registry.yarnpkg.com/@open-wc/semantic-dom-diff/-/semantic-dom-diff-0.13.21.tgz#718b9ec5f9a98935fc775e577ad094ae8d8b7dea" resolved "https://registry.yarnpkg.com/@open-wc/semantic-dom-diff/-/semantic-dom-diff-0.13.21.tgz#718b9ec5f9a98935fc775e577ad094ae8d8b7dea"
@@ -1993,6 +2012,11 @@
resolved "https://registry.yarnpkg.com/@webcomponents/scoped-custom-element-registry/-/scoped-custom-element-registry-0.0.1.tgz#196365260a019f87bddbded154ab09faf0e666fc" resolved "https://registry.yarnpkg.com/@webcomponents/scoped-custom-element-registry/-/scoped-custom-element-registry-0.0.1.tgz#196365260a019f87bddbded154ab09faf0e666fc"
integrity sha512-ef5/v4U2vCxrnSMpo41LSWTjBOXCQ4JOt4+Y6PaSd8ympYioPhOP6E1tKmIk2ppwLSjCKbTyYf7ocHvwDat7bA== integrity sha512-ef5/v4U2vCxrnSMpo41LSWTjBOXCQ4JOt4+Y6PaSd8ympYioPhOP6E1tKmIk2ppwLSjCKbTyYf7ocHvwDat7bA==
"@webcomponents/scoped-custom-element-registry@0.0.2":
version "0.0.2"
resolved "https://registry.yarnpkg.com/@webcomponents/scoped-custom-element-registry/-/scoped-custom-element-registry-0.0.2.tgz#c863d163cb39c60063808e5ae23e06a1766fbe5f"
integrity sha512-lKCoZfKoE3FHvmmj2ytaLBB8Grxp4HaxfSzaGlIZN6xXnOILfpCO0PFJkAxanefLGJWMho4kRY5PhgxWFhmSOw==
"@webcomponents/webcomponentsjs@^2.5.0": "@webcomponents/webcomponentsjs@^2.5.0":
version "2.5.0" version "2.5.0"
resolved "https://registry.yarnpkg.com/@webcomponents/webcomponentsjs/-/webcomponentsjs-2.5.0.tgz#61b27785a6ad5bfd68fa018201fe418b118cb38d" resolved "https://registry.yarnpkg.com/@webcomponents/webcomponentsjs/-/webcomponentsjs-2.5.0.tgz#61b27785a6ad5bfd68fa018201fe418b118cb38d"
@@ -2629,15 +2653,10 @@ camelcase@^6.0.0, camelcase@^6.2.0:
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809"
integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==
caniuse-lite@^1.0.30001165: caniuse-lite@^1.0.30001165, caniuse-lite@^1.0.30001173:
version "1.0.30001170" version "1.0.30001239"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001170.tgz#0088bfecc6a14694969e391cc29d7eb6362ca6a7" resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001239.tgz"
integrity sha512-Dd4d/+0tsK0UNLrZs3CvNukqalnVTRrxb5mcQm8rHL49t7V5ZaTygwXkrq+FB+dVDf++4ri8eJnFEJAB8332PA== integrity sha512-cyBkXJDMeI4wthy8xJ2FvDU6+0dtcZSJW3voUF8+e9f1bBeuvyZfc3PNbkOETyhbR+dGCPzn9E7MA3iwzusOhQ==
caniuse-lite@^1.0.30001173:
version "1.0.30001174"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001174.tgz#0f2aca2153fd88ceb07a2bb982fc2acb787623c4"
integrity sha512-tqClL/4ThQq6cfFXH3oJL4rifFBeM6gTkphjao5kgwMaW9yn0tKgQLAEfKzDwj6HQWCB/aWo8kTFlSvIN8geEA==
ccount@^1.0.0: ccount@^1.0.0:
version "1.1.0" version "1.1.0"
@@ -7747,6 +7766,11 @@ singleton-manager@1.4.1:
resolved "https://registry.yarnpkg.com/singleton-manager/-/singleton-manager-1.4.1.tgz#0a9cd1db2b26e5cbc4ecdc20d5a16f284b36aabb" resolved "https://registry.yarnpkg.com/singleton-manager/-/singleton-manager-1.4.1.tgz#0a9cd1db2b26e5cbc4ecdc20d5a16f284b36aabb"
integrity sha512-HOvKT/WcHvl2cLYGqmO6MaC2J4wAA82LntGwtLn6avnTq15UDLCnSRVXedmglVooLbQGVsQJ+dQz2sKz+2GUZA== integrity sha512-HOvKT/WcHvl2cLYGqmO6MaC2J4wAA82LntGwtLn6avnTq15UDLCnSRVXedmglVooLbQGVsQJ+dQz2sKz+2GUZA==
singleton-manager@1.4.2:
version "1.4.2"
resolved "https://registry.yarnpkg.com/singleton-manager/-/singleton-manager-1.4.2.tgz#4649acafca3eccf987d828ab16369ee59c4a22a5"
integrity sha512-3/K7K61TiN0+tw32HRC3AZQBacN0Ky/NmHEnhofFPEFROqZ5T6BXK45Z94OQsvuFD2euOVOU40XDNeTal63Baw==
sinon@^9.2.3: sinon@^9.2.3:
version "9.2.3" version "9.2.3"
resolved "https://registry.yarnpkg.com/sinon/-/sinon-9.2.3.tgz#f68ce414e843e2fd638703043c97f260697caa52" resolved "https://registry.yarnpkg.com/sinon/-/sinon-9.2.3.tgz#f68ce414e843e2fd638703043c97f260697caa52"