-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix site mode types to be consistently "amp" | "default"
- Loading branch information
1 parent
566ded9
commit 2d2ca82
Showing
38 changed files
with
411 additions
and
359 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 0 additions & 19 deletions
19
packages/file-settings/src/__tests__/mocks/getAllSites/deactivatedPackage.json
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
packages/file-settings/src/__tests__/mocks/getAllSites/deactivatedPackage.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
export default [ | ||
{ | ||
name: "mono-settings", | ||
mode: "default" as const, | ||
state: {}, | ||
packages: [ | ||
{ | ||
name: "@frontity/theme", | ||
active: true, | ||
state: {}, | ||
}, | ||
{ | ||
name: "@frontity/wp-source", | ||
active: false, | ||
state: {}, | ||
}, | ||
], | ||
}, | ||
]; |
19 changes: 0 additions & 19 deletions
19
packages/file-settings/src/__tests__/mocks/getAllSites/monoSettings.json
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
packages/file-settings/src/__tests__/mocks/getAllSites/monoSettings.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
export default [ | ||
{ | ||
name: "mono-settings", | ||
mode: "default" as const, | ||
state: {}, | ||
packages: [ | ||
{ | ||
name: "@frontity/theme", | ||
active: true, | ||
state: {}, | ||
}, | ||
{ | ||
name: "@frontity/wp-source", | ||
active: true, | ||
state: {}, | ||
}, | ||
], | ||
}, | ||
]; |
36 changes: 0 additions & 36 deletions
36
packages/file-settings/src/__tests__/mocks/getAllSites/multiSettings.json
This file was deleted.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
packages/file-settings/src/__tests__/mocks/getAllSites/multiSettings.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
export default [ | ||
{ | ||
name: "settings-default", | ||
mode: "default" as const, | ||
state: {}, | ||
packages: [ | ||
{ | ||
name: "@frontity/theme-default", | ||
active: true, | ||
state: {}, | ||
}, | ||
{ | ||
name: "@frontity/wp-source-default", | ||
active: true, | ||
state: {}, | ||
}, | ||
], | ||
}, | ||
{ | ||
name: "settings-amp", | ||
mode: "amp" as const, | ||
state: {}, | ||
packages: [ | ||
{ | ||
name: "@frontity/theme-amp", | ||
active: true, | ||
state: {}, | ||
}, | ||
{ | ||
name: "@frontity/wp-source-amp", | ||
active: true, | ||
state: {}, | ||
}, | ||
], | ||
}, | ||
]; |
14 changes: 0 additions & 14 deletions
14
packages/file-settings/src/__tests__/mocks/getSettings/monoSettings.json
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
packages/file-settings/src/__tests__/mocks/getSettings/monoSettings.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export default [ | ||
{ | ||
name: "mono-settings", | ||
mode: "default" as const, | ||
state: {}, | ||
packages: [ | ||
{ | ||
name: "@frontity/theme", | ||
active: true, | ||
state: {}, | ||
}, | ||
], | ||
}, | ||
]; |
8 changes: 0 additions & 8 deletions
8
packages/file-settings/src/__tests__/mocks/getSettings/settingsWithLengthOne.json
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
packages/file-settings/src/__tests__/mocks/getSettings/settingsWithLengthOne.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export default [ | ||
{ | ||
name: "settings-with-length-one", | ||
mode: "default" as const, | ||
state: {}, | ||
packages: [], | ||
}, | ||
]; |
16 changes: 0 additions & 16 deletions
16
packages/file-settings/src/__tests__/mocks/getSettings/settingsWithMatches.json
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
packages/file-settings/src/__tests__/mocks/getSettings/settingsWithMatches.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
export default [ | ||
{ | ||
name: "settings-with-short-match", | ||
mode: "default" as const, | ||
state: {}, | ||
match: ["https://frontity.org.*"], | ||
packages: [], | ||
}, | ||
{ | ||
name: "settings-with-large-match", | ||
mode: "default" as const, | ||
state: {}, | ||
match: ["https://frontity.org/page/.*"], | ||
packages: [], | ||
}, | ||
]; |
14 changes: 0 additions & 14 deletions
14
packages/file-settings/src/__tests__/mocks/getSettings/settingsWithNames.json
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
packages/file-settings/src/__tests__/mocks/getSettings/settingsWithNames.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export default [ | ||
{ | ||
name: "settings-one", | ||
mode: "default" as const, | ||
state: {}, | ||
packages: [], | ||
}, | ||
{ | ||
name: "settings-two", | ||
mode: "default" as const, | ||
state: {}, | ||
packages: [], | ||
}, | ||
]; |
15 changes: 0 additions & 15 deletions
15
packages/file-settings/src/__tests__/mocks/getSettings/settingsWithOneMatch.json
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
packages/file-settings/src/__tests__/mocks/getSettings/settingsWithOneMatch.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export default [ | ||
{ | ||
name: "settings-without-match", | ||
mode: "default" as const, | ||
state: {}, | ||
packages: [], | ||
}, | ||
{ | ||
name: "settings-with-match", | ||
mode: "default" as const, | ||
match: ["https://frontity.org.*/amp/?$"], | ||
state: {}, | ||
packages: [], | ||
}, | ||
]; |
19 changes: 0 additions & 19 deletions
19
packages/file-settings/src/__tests__/mocks/normalizeSettings/expectedMono.json
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
packages/file-settings/src/__tests__/mocks/normalizeSettings/expectedMono.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
export default [ | ||
{ | ||
name: "mono-settings", | ||
mode: "amp" as const, | ||
state: {}, | ||
packages: [ | ||
{ | ||
name: "@frontity/theme", | ||
active: true, | ||
state: {}, | ||
}, | ||
{ | ||
name: "@frontity/wp-source", | ||
active: true, | ||
state: {}, | ||
}, | ||
], | ||
}, | ||
]; |
Oops, something went wrong.