@govuk-pay/pay-js-commons 3.3.10 → 3.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/run-tests.yml +4 -1
- package/.idea/codeStyles/Project.xml +27 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/pay-js-commons.iml +9 -0
- package/.idea/sonarlint/issuestore/8/e/8ec9a00bfd09b3190ac6b22251dbb1aa95a0579d +0 -0
- package/.idea/sonarlint/issuestore/index.pb +3 -0
- package/.idea/vcs.xml +6 -0
- package/images/custom/scottish-government-planning.svg +1 -0
- package/package.json +8 -6
- package/sass/custom/scottish-government-planning.scss +56 -0
|
@@ -17,10 +17,13 @@ jobs:
|
|
|
17
17
|
steps:
|
|
18
18
|
- name: Checkout
|
|
19
19
|
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
|
20
|
+
- name: Parse Node version
|
|
21
|
+
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
|
|
22
|
+
id: parse-node-version
|
|
20
23
|
- name: Setup
|
|
21
24
|
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a
|
|
22
25
|
with:
|
|
23
|
-
node-version:
|
|
26
|
+
node-version: "${{ steps.parse-node-version.outputs.NVMRC }}"
|
|
24
27
|
- name: Cache NPM packages
|
|
25
28
|
uses: actions/cache@136d96b4aee02b1f0de3ba493b1d47135042d9c0
|
|
26
29
|
with:
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<component name="ProjectCodeStyleConfiguration">
|
|
2
|
+
<code_scheme name="Project" version="173">
|
|
3
|
+
<JSCodeStyleSettings version="0">
|
|
4
|
+
<option name="USE_SEMICOLON_AFTER_STATEMENT" value="false" />
|
|
5
|
+
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
6
|
+
<option name="SPACE_BEFORE_GENERATOR_MULT" value="true" />
|
|
7
|
+
<option name="USE_DOUBLE_QUOTES" value="false" />
|
|
8
|
+
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
9
|
+
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
10
|
+
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
11
|
+
</JSCodeStyleSettings>
|
|
12
|
+
<codeStyleSettings language="JavaScript">
|
|
13
|
+
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
|
|
14
|
+
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
|
|
15
|
+
<option name="ALIGN_MULTILINE_FOR" value="false" />
|
|
16
|
+
<option name="SPACE_BEFORE_METHOD_PARENTHESES" value="true" />
|
|
17
|
+
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
|
|
18
|
+
<option name="KEEP_SIMPLE_BLOCKS_IN_ONE_LINE" value="true" />
|
|
19
|
+
<option name="KEEP_SIMPLE_METHODS_IN_ONE_LINE" value="true" />
|
|
20
|
+
<indentOptions>
|
|
21
|
+
<option name="INDENT_SIZE" value="2" />
|
|
22
|
+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
23
|
+
<option name="TAB_SIZE" value="2" />
|
|
24
|
+
</indentOptions>
|
|
25
|
+
</codeStyleSettings>
|
|
26
|
+
</code_scheme>
|
|
27
|
+
</component>
|
package/.idea/misc.xml
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectModuleManager">
|
|
4
|
+
<modules>
|
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/pay-js-commons.iml" filepath="$PROJECT_DIR$/.idea/pay-js-commons.iml" />
|
|
6
|
+
</modules>
|
|
7
|
+
</component>
|
|
8
|
+
</project>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="JAVA_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
|
+
<exclude-output />
|
|
5
|
+
<content url="file://$MODULE_DIR$" />
|
|
6
|
+
<orderEntry type="inheritedJdk" />
|
|
7
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
8
|
+
</component>
|
|
9
|
+
</module>
|
|
File without changes
|
package/.idea/vcs.xml
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 204 38.8" xml:space="preserve"><style>.st0{fill:#0065bd}.st1{fill:#333}</style><g id="Logo" transform="translate(0 .961)"><g id="Group_10868"><g id="Group_10868-2" transform="translate(0 .185)"><path id="Path_10094" class="st0" d="M0 4.2v28.9l23.6-14.3L0 4.2z"/><path id="Path_10095" class="st0" d="M63.5 4.2v28.9L39.9 18.8 63.5 4.2z"/><path id="Path_10096" class="st0" d="M7.8 0h47.4L31.3 13.9 7.8 0z"/><path id="Path_10097" class="st0" d="M7.8 37.6h47.4l-23.9-14-23.5 14z"/></g><path id="Rectangle_1435" class="st1" d="M79.3 0h2v37.8h-2z"/><path class="st1" d="M100.2 20.3V27h-4V7.8h7.5c1.4 0 2.7.3 3.8.8 1.1.5 1.9 1.3 2.5 2.2.6 1 .9 2.1.9 3.3 0 1.9-.6 3.4-1.9 4.4-1.3 1.1-3.1 1.6-5.3 1.6h-3.5zm0-3.2h3.5c1 0 1.8-.2 2.4-.7.5-.5.8-1.2.8-2.1 0-.9-.3-1.7-.8-2.3s-1.3-.9-2.3-.9h-3.6v6zm17.1 9.9h-3.8V6.8h3.8V27zm11.3 0c-.2-.3-.3-.8-.4-1.3-.9 1-2.1 1.5-3.6 1.5-1.4 0-2.6-.4-3.5-1.2-.9-.8-1.4-1.8-1.4-3.1 0-1.5.6-2.7 1.7-3.5 1.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1.6l.2-1.3h3.5v13.8c0 1.2-.3 2.3-.9 3.3-.6.9-1.4 1.6-2.4 2.1s-2.2.7-3.6.7c-1 0-2.1-.2-3.1-.6-1-.4-1.7-1-2.3-1.6l1.7-2.3c.9 1.1 2.1 1.6 3.5 1.6 1 0 1.8-.3 2.4-.8.6-.5.8-1.3.8-2.3v-.8c-.9 1-2 1.5-3.5 1.5-1.7 0-3.1-.7-4.2-2s-1.6-3.1-1.6-5.3v-.3zm3.8.3c0 1.3.3 2.3.8 3 .5.7 1.2 1.1 2.1 1.1 1.2 0 2-.4 2.5-1.3v-6c-.5-.9-1.3-1.3-2.5-1.3-.9 0-1.6.4-2.2 1.1-.4.8-.7 1.9-.7 3.4z"/></g></g></svg>
|
package/package.json
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@govuk-pay/pay-js-commons",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.1",
|
|
4
4
|
"description": "Reusable js scripts for GOV.UK Pay Node.js projects",
|
|
5
|
+
"engines": {
|
|
6
|
+
"node": "^16.14.0"
|
|
7
|
+
},
|
|
5
8
|
"main": "lib/index.js",
|
|
6
9
|
"scripts": {
|
|
7
10
|
"compile": "npm run transpile",
|
|
@@ -33,7 +36,6 @@
|
|
|
33
36
|
"Google Analytics",
|
|
34
37
|
"Event Tracking"
|
|
35
38
|
],
|
|
36
|
-
"author": "Jon Heslop (Government Digital Service)",
|
|
37
39
|
"license": "MIT",
|
|
38
40
|
"bugs": {
|
|
39
41
|
"url": "https://github.com/alphagov/pay-js-commons/issues"
|
|
@@ -114,7 +116,7 @@
|
|
|
114
116
|
"chai": "^4.2.0",
|
|
115
117
|
"eslint-plugin-import": "^2.18.0",
|
|
116
118
|
"eslint-plugin-promise": "^5.1.0",
|
|
117
|
-
"husky": "^
|
|
119
|
+
"husky": "^8.0.1",
|
|
118
120
|
"jest": "^27.0.1",
|
|
119
121
|
"js-cookie": "^3.0.0",
|
|
120
122
|
"jsdom": "^19.0.0",
|
|
@@ -126,13 +128,13 @@
|
|
|
126
128
|
"karma-mocha": "^2.0.0",
|
|
127
129
|
"karma-mocha-reporter": "^2.2.5",
|
|
128
130
|
"karma-source-map-support": "^1.2.0",
|
|
129
|
-
"lint-staged": "^
|
|
131
|
+
"lint-staged": "^13.0.1",
|
|
130
132
|
"mocha": "^9.1.0",
|
|
131
|
-
"sinon": "^
|
|
133
|
+
"sinon": "^14.0.0",
|
|
132
134
|
"standard": "^16.0.3",
|
|
133
135
|
"uglify-js": "^3.6.0",
|
|
134
136
|
"watchify": "^4.0.0",
|
|
135
|
-
"xo": "^0.
|
|
137
|
+
"xo": "^0.49.0"
|
|
136
138
|
},
|
|
137
139
|
"directories": {
|
|
138
140
|
"lib": "lib"
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
$govuk-font-family: -apple-system,BlinkMacSystemFont,helvetica neue,helvetica,ubuntu,roboto,noto,segoe ui,arial,sans-serif; // Override font as so not to use New Transport
|
|
2
|
+
@import "application";
|
|
3
|
+
|
|
4
|
+
// CUSTOM BRANDING
|
|
5
|
+
// Use the variables below to control the style
|
|
6
|
+
// Make sure banner colours meet minimum colour contrast levels
|
|
7
|
+
|
|
8
|
+
$custom-banner-colour: #ffffff;
|
|
9
|
+
$custom-banner-border-colour: #cccccc;
|
|
10
|
+
$custom-text-colour: #0b0c0c;
|
|
11
|
+
$logo-image-height: 2em;
|
|
12
|
+
|
|
13
|
+
.custom-branding {
|
|
14
|
+
@if $logo-image-height != null {
|
|
15
|
+
.custom-branding-image {
|
|
16
|
+
max-height: $logo-image-height;
|
|
17
|
+
min-width: 204px;
|
|
18
|
+
|
|
19
|
+
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
|
|
20
|
+
width: 100%;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.govuk-header {
|
|
26
|
+
background-color: $custom-banner-colour;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.govuk-header__link{
|
|
30
|
+
&:link,
|
|
31
|
+
&:visited {
|
|
32
|
+
color: $custom-text-colour;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.govuk-header__link--service-name {
|
|
37
|
+
color: $custom-text-colour;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.govuk-header__container {
|
|
41
|
+
border-bottom-color: $custom-banner-border-colour;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@include govuk-media-query($from: tablet) {
|
|
45
|
+
.govuk-header__content {
|
|
46
|
+
width: 66%;
|
|
47
|
+
vertical-align: bottom;
|
|
48
|
+
margin-bottom: 7px;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.govuk-button {
|
|
53
|
+
padding: 7px 15px 6px;
|
|
54
|
+
padding: .368421053em .842105263em .315789474em;
|
|
55
|
+
}
|
|
56
|
+
}
|