Skip to content

Commit

Permalink
Switch to sync-message-port
Browse files Browse the repository at this point in the history
  • Loading branch information
ntkme committed Nov 4, 2024
1 parent 3b0584b commit 1586bbd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"chokidar": "^4.0.0",
"immutable": "^4.0.0",
"intercept-stdout": "^0.1.2",
"sass-embedded": "latest"
"sync-message-port": "v1.1.1"
}
}
3 changes: 2 additions & 1 deletion package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"dependencies": {
"chokidar": "^4.0.0",
"immutable": "^4.0.0",
"source-map-js": ">=0.6.2 <2.0.0"
"source-map-js": ">=0.6.2 <2.0.0",
"sync-message-port": "^1.1.1"
},
"optionalDependencies": {
"@parcel/watcher": "^2.4.1"
Expand Down
11 changes: 1 addition & 10 deletions tool/grind.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ void main(List<String> args) {
pkg.JSRequire("stream", target: pkg.JSRequireTarget.node),
pkg.JSRequire("util", target: pkg.JSRequireTarget.node),
pkg.JSRequire("worker_threads", target: pkg.JSRequireTarget.cli),
pkg.JSRequire("./sync-message-port.js",
target: pkg.JSRequireTarget.cli, identifier: 'sync_message_port'),
pkg.JSRequire("sync-message-port", target: pkg.JSRequireTarget.cli),
];
pkg.jsModuleMainLibrary.value = "lib/src/js.dart";
pkg.npmPackageJson.fn = () =>
Expand Down Expand Up @@ -135,8 +134,6 @@ void main(List<String> args) {

afterTask("pkg-npm-dev", _addDefaultExport);
afterTask("pkg-npm-release", _addDefaultExport);
afterTask("pkg-npm-dev", _addSyncMessagePort);
afterTask("pkg-npm-release", _addSyncMessagePort);

grind(args);
}
Expand Down Expand Up @@ -309,12 +306,6 @@ function defaultExportDeprecation() {
File("build/npm/sass.node.mjs").writeAsStringSync(buffer.toString());
}

/// After building the NPM package, copy the sync-message-port.js from sass-embedded
void _addSyncMessagePort() {
File("node_modules/sass-embedded/dist/lib/src/sync-process/sync-message-port.js")
.copy("build/npm/sync-message-port.js");
}

/// A regular expression to locate the language repo revision in the Dart Sass
/// Homebrew formula.
final _homebrewLanguageRegExp = RegExp(
Expand Down

0 comments on commit 1586bbd

Please sign in to comment.