Skip to content

Commit 62ec78a

Browse files
committed
build: update to latest sass version
Bumps to the latest version of Sass and fixes up our custom patch so that it accounts for some changes in the published files.
1 parent ae061d7 commit 62ec78a

File tree

4 files changed

+21
-15
lines changed

4 files changed

+21
-15
lines changed

WORKSPACE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ http_archive(
1919
# printed in worker mode: https://github.com/bazelbuild/rules_sass/issues/96.
2020
# TODO(devversion): remove this patch once the Sass Node entry-point returns a `Promise`.
2121
patches = ["//tools/postinstall:sass_worker_async.patch"],
22-
sha256 = "c78be58f5e0a29a04686b628cf54faaee0094322ae0ac99da5a8a8afca59a647",
23-
strip_prefix = "rules_sass-1.25.0",
22+
sha256 = "cf28ff1bcfafb3c97f138bbc8ca9fe386e968ed3faaa9f8e6214abb5e88a2ecd",
23+
strip_prefix = "rules_sass-1.29.0",
2424
urls = [
25-
"https://github.com/bazelbuild/rules_sass/archive/1.25.0.zip",
25+
"https://github.com/bazelbuild/rules_sass/archive/1.29.0.zip",
2626
],
2727
)
2828

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
"rollup-plugin-node-resolve": "^5.2.0",
159159
"rollup-plugin-sourcemaps": "^0.4.2",
160160
"run-sequence": "^1.2.2",
161-
"sass": "^1.24.4",
161+
"sass": "^1.29.0",
162162
"scss-bundle": "^3.1.2",
163163
"selenium-webdriver": "^3.6.0",
164164
"semver": "^6.3.0",

tools/postinstall/sass_worker_async.patch

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
diff --git sass/sass_wrapper.js sass/sass_wrapper.js
2-
index 21abb8f..9c750a3 100644
2+
index ad1f7a6..957d56e 100644
33
--- sass/sass_wrapper.js
44
+++ sass/sass_wrapper.js
5-
@@ -17,7 +17,11 @@ const fs = require('fs');
5+
@@ -17,7 +17,17 @@ const fs = require('fs');
66
const args = process.argv.slice(2);
77
if (runAsWorker(args)) {
88
debug('Starting Sass compiler persistent worker...');
9-
- runWorkerLoop(args => sass.run_(args));
9+
- runWorkerLoop(args => sass.cli_pkg_main_0_(args));
1010
+ runWorkerLoop(args => {
1111
+ return new Promise(resolve => {
12-
+ sass.run_(args)['then$1$2$onError'](() => resolve(true), () => resolve(false));
12+
+ const result = sass.cli_pkg_main_0_(args);
13+
+ const originalThen = result.then$1$2$onError;
14+
+ let dynamicType;
15+
+ result.then$1$2$onError = (receiver, done, error, type) => dynamicType = type;
16+
+ result.then$1();
17+
+ result.then$1$2$onError = originalThen;
18+
+ result.then$1$2$onError(null, () => resolve(true), () => resolve(false), dynamicType);
1319
+ });
1420
+ });
1521
// Note: intentionally don't process.exit() here, because runWorkerLoop

yarn.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10836,16 +10836,16 @@ sass-lookup@^3.0.0:
1083610836
commander "^2.16.0"
1083710837

1083810838
sass@^1.23.7:
10839-
version "1.29.0"
10840-
resolved "https://registry.yarnpkg.com/sass/-/sass-1.29.0.tgz#ec4e1842c146d8ea9258c28c141b8c2b7c6ab7f1"
10841-
integrity sha512-ZpwAUFgnvAUCdkjwPREny+17BpUj8nh5Yr6zKPGtLNTLrmtoRYIjm7njP24COhjJldjwW1dcv52Lpf4tNZVVRA==
10839+
version "1.27.0"
10840+
resolved "https://registry.yarnpkg.com/sass/-/sass-1.27.0.tgz#0657ff674206b95ec20dc638a93e179c78f6ada2"
10841+
integrity sha512-0gcrER56OkzotK/GGwgg4fPrKuiFlPNitO7eUJ18Bs+/NBlofJfMxmxqpqJxjae9vu0Wq8TZzrSyxZal00WDig==
1084210842
dependencies:
1084310843
chokidar ">=2.0.0 <4.0.0"
1084410844

10845-
sass@^1.24.4:
10846-
version "1.24.4"
10847-
resolved "https://registry.yarnpkg.com/sass/-/sass-1.24.4.tgz#aa50575a9ed2b9e9645b5599156fd149bdad9eaa"
10848-
integrity sha512-SqizkIEEcVPzmK1tYdlNRl/RSXMEwGcifL9GD+S2p9rEPdj6ycRbk4PWZs0jwlajNSyBPo/SXRB81i22SG0jmw==
10845+
sass@^1.29.0:
10846+
version "1.29.0"
10847+
resolved "https://registry.yarnpkg.com/sass/-/sass-1.29.0.tgz#ec4e1842c146d8ea9258c28c141b8c2b7c6ab7f1"
10848+
integrity sha512-ZpwAUFgnvAUCdkjwPREny+17BpUj8nh5Yr6zKPGtLNTLrmtoRYIjm7njP24COhjJldjwW1dcv52Lpf4tNZVVRA==
1084910849
dependencies:
1085010850
chokidar ">=2.0.0 <4.0.0"
1085110851

0 commit comments

Comments
 (0)