Skip to content

Commit ca92123

Browse files
authored
feat(csp): set nonce attribute for injected styles if available (#328)
Uses a fork of cxs that sets a nonce attribute to the injected style tag if it is globally available. Related cxs PR to merge this functionality into the base lib: cxs-css/cxs#97
1 parent 9285093 commit ca92123

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"cross-env": "5.1.1",
5555
"css-loader": "0.28.7",
5656
"cssnano": "3.10.0",
57-
"cxs": "6.1.0",
57+
"cxs": "https://github.com/arahansen/cxs#d593d14e708c4f5c17cb2105cb9435ae87ade362",
5858
"cz-conventional-changelog": "2.1.0",
5959
"enzyme": "3.2.0",
6060
"enzyme-adapter-react-16": "1.1.0",
@@ -69,7 +69,7 @@
6969
"extract-text-webpack-plugin": "3.0.2",
7070
"find-up": "2.1.0",
7171
"flow-bin": "0.61.0",
72-
"flow-copy-source": "https://github.com/arahansen/flow-copy-source#29ea3c2c0c58d32182ce953a5d7fa2ab788314d4",
72+
"flow-copy-source": "1.2.1",
7373
"html-loader": "0.5.1",
7474
"husky": "0.14.3",
7575
"ignore-loader": "0.1.2",

scripts/flowsource.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ set -e
1010
rm -f dist/{,**/}*.flow
1111

1212
# Generate flow source for all files
13-
./node_modules/.bin/flow-copy-source -v -f '**/{,**/}*.{css,js}' src dist
13+
./node_modules/.bin/flow-copy-source -v src dist
1414

1515
# Remove spec files
1616
rm -f dist/{,**/}*.spec.js.flow

yarn.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2919,9 +2919,9 @@ currently-unhandled@^0.4.1:
29192919
dependencies:
29202920
array-find-index "^1.0.1"
29212921

2922-
cxs@6.1.0:
2922+
"cxs@https://github.com/arahansen/cxs#d593d14e708c4f5c17cb2105cb9435ae87ade362":
29232923
version "6.1.0"
2924-
resolved "https://registry.yarnpkg.com/cxs/-/cxs-6.1.0.tgz#8d6193230a79fd25f9a3c2919de913967b01c80f"
2924+
resolved "https://github.com/arahansen/cxs#d593d14e708c4f5c17cb2105cb9435ae87ade362"
29252925
dependencies:
29262926
objss "^1.0.3"
29272927
tag-hoc "^1.0.0-0"
@@ -4028,14 +4028,14 @@ flow-bin@0.61.0:
40284028
version "0.61.0"
40294029
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.61.0.tgz#d0473a8c35dbbf4de573823f4932124397d32d35"
40304030

4031-
"flow-copy-source@https://github.com/arahansen/flow-copy-source#29ea3c2c0c58d32182ce953a5d7fa2ab788314d4":
4032-
version "1.2.0"
4033-
resolved "https://github.com/arahansen/flow-copy-source#29ea3c2c0c58d32182ce953a5d7fa2ab788314d4"
4031+
flow-copy-source@1.2.1:
4032+
version "1.2.1"
4033+
resolved "https://registry.yarnpkg.com/flow-copy-source/-/flow-copy-source-1.2.1.tgz#705c2fa8fb29a281118e1c4b66218dec24b745ec"
40344034
dependencies:
40354035
chokidar "^1.7.0"
40364036
fs-extra "^3.0.1"
40374037
glob "^7.0.0"
4038-
kefir "^3.2.0"
4038+
kefir "^3.7.3"
40394039
yargs "^8.0.2"
40404040

40414041
follow-redirects@1.0.0:
@@ -5773,7 +5773,7 @@ jsx-ast-utils@^2.0.0:
57735773
dependencies:
57745774
array-includes "^3.0.3"
57755775

5776-
kefir@^3.2.0:
5776+
kefir@^3.7.3:
57775777
version "3.8.0"
57785778
resolved "https://registry.yarnpkg.com/kefir/-/kefir-3.8.0.tgz#63b5dce575f1a7ab3286788e771eb104b181b676"
57795779
dependencies:

0 commit comments

Comments
 (0)