Skip to content

Commit 0b4bf33

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 d686290 commit 0b4bf33

File tree

4 files changed

+22
-9
lines changed

4 files changed

+22
-9
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
@@ -157,7 +157,7 @@
157157
"rollup-plugin-node-resolve": "^5.2.0",
158158
"rollup-plugin-sourcemaps": "^0.4.2",
159159
"run-sequence": "^1.2.2",
160-
"sass": "^1.24.4",
160+
"sass": "^1.29.0",
161161
"scss-bundle": "^3.0.2",
162162
"selenium-webdriver": "^3.6.0",
163163
"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: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10721,13 +10721,20 @@ sass-lookup@^3.0.0:
1072110721
dependencies:
1072210722
commander "^2.16.0"
1072310723

10724-
sass@^1.23.7, sass@^1.24.4:
10724+
sass@^1.23.7:
1072510725
version "1.27.0"
1072610726
resolved "https://registry.yarnpkg.com/sass/-/sass-1.27.0.tgz#0657ff674206b95ec20dc638a93e179c78f6ada2"
1072710727
integrity sha512-0gcrER56OkzotK/GGwgg4fPrKuiFlPNitO7eUJ18Bs+/NBlofJfMxmxqpqJxjae9vu0Wq8TZzrSyxZal00WDig==
1072810728
dependencies:
1072910729
chokidar ">=2.0.0 <4.0.0"
1073010730

10731+
sass@^1.29.0:
10732+
version "1.29.0"
10733+
resolved "https://registry.yarnpkg.com/sass/-/sass-1.29.0.tgz#ec4e1842c146d8ea9258c28c141b8c2b7c6ab7f1"
10734+
integrity sha512-ZpwAUFgnvAUCdkjwPREny+17BpUj8nh5Yr6zKPGtLNTLrmtoRYIjm7njP24COhjJldjwW1dcv52Lpf4tNZVVRA==
10735+
dependencies:
10736+
chokidar ">=2.0.0 <4.0.0"
10737+
1073110738
sauce-connect-launcher@^1.2.4:
1073210739
version "1.2.4"
1073310740
resolved "https://registry.yarnpkg.com/sauce-connect-launcher/-/sauce-connect-launcher-1.2.4.tgz#8d38f85242a9fbede1b2303b559f7e20c5609a1c"

0 commit comments

Comments
 (0)