Skip to content

Commit

Permalink
Revert "JSON LD Stuff"
Browse files Browse the repository at this point in the history
This reverts commit 56e3001.
  • Loading branch information
mattzeunert committed Feb 3, 2019
1 parent 3a92230 commit 624690f
Show file tree
Hide file tree
Showing 27 changed files with 3 additions and 13,437 deletions.
8 changes: 1 addition & 7 deletions build/build-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,7 @@ async function browserifyFile(entryPath, distPath) {
.ignore('raven')
.ignore('mkdirp')
.ignore('rimraf')
.ignore('pako/lib/zlib/inflate.js')
.ignore('file')
.ignore('system');

// there is no way to add './doug-json-parse' to ignored packages via public API
// w/o browserify resolving the path into an absolute path
bundle._ignore.push('./doug-json-parse');
.ignore('pako/lib/zlib/inflate.js');

// Don't include the desktop protocol connection.
bundle.ignore(require.resolve('../lighthouse-core/gather/connections/cri.js'));
Expand Down
33 changes: 0 additions & 33 deletions jslondtest.js

This file was deleted.

20 changes: 0 additions & 20 deletions lighthouse-cli/test/fixtures/seo/seo-failure-cases.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,6 @@
<link rel="alternate" href="http://example.com/" hreflang=" x-default" />
<!-- FAIL(canonical): multiple canonical URLs provided (another one is in the HTTP header) -->
<link rel="canonical" href="https://example.com/" />
<!-- FAIL(structured-data-automatic): invalid JSON -->
<script type="application/ld+json">
{
"@context": "http://schema.org"
</script>
<!-- FAIL(structured-data-automatic): invalid JSON-LD -->
<script type="application/ld+json">
{
"@invalid-keyword": "oh no"
}
</script>
<!-- FAIL(structured-data-automatic): invalid schema.org type -->
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Cat",
"name": "Garfield",
"url": "https://garfield.com/"
}
</script>
</head>
<body>
<h1>SEO</h1>
Expand Down
42 changes: 0 additions & 42 deletions lighthouse-cli/test/fixtures/seo/seo-tester.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,48 +19,6 @@
<link rel="alternate" href="http://example.com/" hreflang="x-default" />
<!-- PASS(canonical): valid canonical URL -->
<link rel="canonical" href="http://localhost:10200/seo/" />
<!-- PASS(structured-data-automatic): valid JSON-LD -->
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Recipe",
"author": "John Smith",
"cookTime": "PT1H",
"datePublished": "2009-05-08",
"description": "This classic banana bread recipe comes from my mom -- the walnuts add a nice texture and flavor to the banana bread.",
"image": "bananabread.jpg",
"recipeIngredient": [
"3 or 4 ripe bananas, smashed",
"1 egg",
"3/4 cup of sugar"
],
"interactionStatistic": {
"@type": "InteractionCounter",
"interactionType": "http://schema.org/Comment",
"userInteractionCount": "140"
},
"name": "Mom's World Famous Banana Bread",
"nutrition": {
"@type": "NutritionInformation",
"calories": "240 calories",
"fatContent": "9 grams fat"
},
"prepTime": "PT15M",
"recipeInstructions": "Preheat the oven to 350 degrees. Mix in the ingredients in a bowl. Add the flour last. Pour the mixture into a loaf pan and bake for one hour.",
"recipeYield": "1 loaf",
"suitableForDiet": "http://schema.org/LowFatDiet"
}
</script>
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Person",
"name": "Jane Doe",
"jobTitle": "Professor",
"telephone": "(425) 123-4567",
"url": "http://www.janedoe.com"
}
</script>

<style>
.small {
Expand Down
11 changes: 0 additions & 11 deletions lighthouse-cli/test/smokehouse/seo/expectations.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ module.exports = [
rawValue: true,
scoreDisplayMode: 'notApplicable',
},
'structured-data-automatic': {
rawValue: true,
},
},
},
{
Expand Down Expand Up @@ -142,14 +139,6 @@ module.exports = [
score: 0,
explanation: 'Multiple conflicting URLs (https://example.com, https://example.com/)',
},
'structured-data-automatic': {
rawValue: false,
details: {
items: {
length: 3,
},
},
},
},
},
{
Expand Down
161 changes: 0 additions & 161 deletions lighthouse-core/audits/seo/structured-data-automatic.js

This file was deleted.

3 changes: 0 additions & 3 deletions lighthouse-core/config/default-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ const defaultConfig = {
'seo/hreflang',
'seo/embedded-content',
'seo/canonical',
'seo/json-ld',
'seo/robots-txt',
'seo/tap-targets',
],
Expand Down Expand Up @@ -248,7 +247,6 @@ const defaultConfig = {
'seo/hreflang',
'seo/plugins',
'seo/canonical',
'seo/structured-data-automatic',
'seo/manual/mobile-friendly',
'seo/manual/structured-data',
],
Expand Down Expand Up @@ -453,7 +451,6 @@ const defaultConfig = {
{id: 'font-size', weight: 1, group: 'seo-mobile'},
{id: 'plugins', weight: 1, group: 'seo-content'},
{id: 'tap-targets', weight: 1, group: 'seo-mobile'},
{id: 'structured-data-automatic', weight: 1, group: 'seo-content'},
// Manual audits
{id: 'mobile-friendly', weight: 0},
{id: 'structured-data', weight: 0},
Expand Down
33 changes: 0 additions & 33 deletions lighthouse-core/gather/gatherers/seo/json-ld.js

This file was deleted.

7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@
"unit-cli": "jest --runInBand \"lighthouse-cli/\"",
"unit-cli:ci": "jest --runInBand --coverage --ci \"lighthouse-cli/\"",
"unit-viewer": "mocha --reporter dot \"lighthouse-viewer/test/**/*-test.js\"",
"unit-sd-validation": "mocha --reporter dot \"sd-validation/test/**/*-test.js\"",
"unit": "yarn unit-core && yarn unit-cli && yarn unit-viewer && yarn unit-sd-validation",
"unit:ci": "yarn unit-core:ci && yarn unit-cli:ci && yarn unit-viewer && yarn unit-sd-validation",
"unit": "yarn unit-core && yarn unit-cli && yarn unit-viewer",
"unit:ci": "yarn unit-core:ci && yarn unit-cli:ci && yarn unit-viewer",
"core-unit": "yarn unit-core",
"cli-unit": "yarn unit-cli",
"viewer-unit": "yarn unit-viewer",
Expand Down Expand Up @@ -149,8 +148,6 @@
"intl-messageformat": "^2.2.0",
"intl-messageformat-parser": "^1.4.0",
"jpeg-js": "0.1.2",
"jsonld": "^1.0.2",
"jsonlint-mod": "^1.7.2",
"js-library-detector": "^5.1.0",
"lighthouse-logger": "^1.2.0",
"lodash.isequal": "^4.5.0",
Expand Down
Loading

0 comments on commit 624690f

Please sign in to comment.