sass-embedded 1.54.2 → 1.54.8
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/CHANGELOG.md +47 -1
- package/dist/.gitignore +1 -0
- package/dist/lib/src/compiler-path.js +16 -1
- package/dist/lib/src/compiler-path.js.map +1 -1
- package/dist/package.json +19 -7
- package/dist/tool/prepare-dev-environment.js +116 -0
- package/dist/tool/prepare-dev-environment.js.map +1 -0
- package/dist/tool/prepare-optional-release.js +24 -0
- package/dist/tool/prepare-optional-release.js.map +1 -0
- package/dist/tool/prepare-release.js +55 -0
- package/dist/tool/prepare-release.js.map +1 -0
- package/dist/tool/utils.js +32 -23
- package/dist/tool/utils.js.map +1 -1
- package/package.json +19 -7
- package/download-compiler-for-end-user.js +0 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,49 @@
|
|
|
1
|
+
## 1.54.8
|
|
2
|
+
|
|
3
|
+
* No user-visible changes.
|
|
4
|
+
|
|
5
|
+
## 1.54.7
|
|
6
|
+
|
|
7
|
+
* Add support for 32-bit ARM releases on Linux.
|
|
8
|
+
|
|
9
|
+
## 1.54.6
|
|
10
|
+
|
|
11
|
+
* Fix a bug where a `@media` query could be incorrectly omitted from a
|
|
12
|
+
stylesheet if it had multiple levels of nested `@media` queries within it
|
|
13
|
+
*and* the inner queries were mergeable but the outer query was not.
|
|
14
|
+
|
|
15
|
+
## 1.54.5
|
|
16
|
+
|
|
17
|
+
* Properly consider `a ~ c` to be a superselector of `a ~ b ~ c` and `a + b +
|
|
18
|
+
c`.
|
|
19
|
+
|
|
20
|
+
* Properly consider `b > c` to be a superselector of `a > b > c`, and similarly
|
|
21
|
+
for other combinators.
|
|
22
|
+
|
|
23
|
+
* Properly calculate specificity for selector pseudoclasses.
|
|
24
|
+
|
|
25
|
+
* Deprecate use of `random()` when `$limit` has units to make it explicit that
|
|
26
|
+
`random()` currently ignores units. A future version will no longer ignore
|
|
27
|
+
units.
|
|
28
|
+
|
|
29
|
+
* Don't throw an error when the same module is `@forward`ed multiple times
|
|
30
|
+
through a configured module.
|
|
31
|
+
|
|
32
|
+
### Embedded Sass
|
|
33
|
+
|
|
34
|
+
* Rather than downloading the embedded compiler for the local platform on
|
|
35
|
+
install, the `sass-embedded` npm package now declares optional dependencies on
|
|
36
|
+
platform-specific embedded compiler packages.
|
|
37
|
+
|
|
38
|
+
## 1.54.4
|
|
39
|
+
|
|
40
|
+
* Improve error messages when passing incorrect units that are also
|
|
41
|
+
out-of-bounds to various color functions.
|
|
42
|
+
|
|
43
|
+
## 1.54.3
|
|
44
|
+
|
|
45
|
+
* Release a native ARM64 executable for Mac OS.
|
|
46
|
+
|
|
1
47
|
## 1.54.2
|
|
2
48
|
|
|
3
49
|
* No user-visible changes.
|
|
@@ -21,7 +67,7 @@
|
|
|
21
67
|
* Add partial support for new media query syntax from Media Queries Level 4. The
|
|
22
68
|
only exception are logical operations nested within parentheses, as these were
|
|
23
69
|
previously interpreted differently as SassScript expressions.
|
|
24
|
-
|
|
70
|
+
|
|
25
71
|
A parenthesized media condition that begins with `not` or an opening
|
|
26
72
|
parenthesis now produces a deprecation warning. In a future release, these
|
|
27
73
|
will be interpreted as plain CSS instead.
|
package/dist/.gitignore
CHANGED
|
@@ -6,13 +6,28 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.compilerPath = void 0;
|
|
7
7
|
const fs = require("fs");
|
|
8
8
|
const p = require("path");
|
|
9
|
+
const utils_1 = require("./utils");
|
|
9
10
|
/** The path to the embedded compiler executable. */
|
|
10
11
|
exports.compilerPath = (() => {
|
|
12
|
+
try {
|
|
13
|
+
return require.resolve(`sass-embedded-${process.platform}-${process.arch}/` +
|
|
14
|
+
'dart-sass-embedded/dart-sass-embedded' +
|
|
15
|
+
(process.platform === 'win32' ? '.bat' : ''));
|
|
16
|
+
}
|
|
17
|
+
catch (e) {
|
|
18
|
+
if (!((0, utils_1.isErrnoException)(e) && e.code === 'MODULE_NOT_FOUND')) {
|
|
19
|
+
throw e;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
// find for development
|
|
11
23
|
for (const path of ['vendor', '../../../lib/src/vendor']) {
|
|
12
24
|
const executable = p.resolve(__dirname, path, `dart-sass-embedded/dart-sass-embedded${process.platform === 'win32' ? '.bat' : ''}`);
|
|
13
25
|
if (fs.existsSync(executable))
|
|
14
26
|
return executable;
|
|
15
27
|
}
|
|
16
|
-
throw new Error("Embedded Dart Sass couldn't find the embedded compiler executable."
|
|
28
|
+
throw new Error("Embedded Dart Sass couldn't find the embedded compiler executable. " +
|
|
29
|
+
'Please make sure the optional dependency ' +
|
|
30
|
+
'sass-embedded-${process.platform}-${process.arch} is installed in ' +
|
|
31
|
+
'node_modules.');
|
|
17
32
|
})();
|
|
18
33
|
//# sourceMappingURL=compiler-path.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compiler-path.js","sourceRoot":"","sources":["../../../lib/src/compiler-path.ts"],"names":[],"mappings":";AAAA,uEAAuE;AACvE,gEAAgE;AAChE,uCAAuC;;;AAEvC,yBAAyB;AACzB,0BAA0B;
|
|
1
|
+
{"version":3,"file":"compiler-path.js","sourceRoot":"","sources":["../../../lib/src/compiler-path.ts"],"names":[],"mappings":";AAAA,uEAAuE;AACvE,gEAAgE;AAChE,uCAAuC;;;AAEvC,yBAAyB;AACzB,0BAA0B;AAC1B,mCAAyC;AAEzC,oDAAoD;AACvC,QAAA,YAAY,GAAG,CAAC,GAAG,EAAE;IAChC,IAAI;QACF,OAAO,OAAO,CAAC,OAAO,CACpB,iBAAiB,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,GAAG;YAClD,uCAAuC;YACvC,CAAC,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAC/C,CAAC;KACH;IAAC,OAAO,CAAU,EAAE;QACnB,IAAI,CAAC,CAAC,IAAA,wBAAgB,EAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,kBAAkB,CAAC,EAAE;YAC3D,MAAM,CAAC,CAAC;SACT;KACF;IAED,uBAAuB;IACvB,KAAK,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,yBAAyB,CAAC,EAAE;QACxD,MAAM,UAAU,GAAG,CAAC,CAAC,OAAO,CAC1B,SAAS,EACT,IAAI,EACJ,wCACE,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAC1C,EAAE,CACH,CAAC;QAEF,IAAI,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;YAAE,OAAO,UAAU,CAAC;KAClD;IAED,MAAM,IAAI,KAAK,CACb,qEAAqE;QACnE,2CAA2C;QAC3C,oEAAoE;QACpE,eAAe,CAClB,CAAC;AACJ,CAAC,CAAC,EAAE,CAAC"}
|
package/dist/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sass-embedded",
|
|
3
|
-
"version": "1.54.
|
|
3
|
+
"version": "1.54.8",
|
|
4
4
|
"protocol-version": "1.1.0",
|
|
5
|
-
"compiler-version": "1.54.
|
|
5
|
+
"compiler-version": "1.54.8",
|
|
6
6
|
"description": "Node.js library that communicates with Embedded Dart Sass using the Embedded Sass protocol",
|
|
7
7
|
"repository": "sass/embedded-host-node",
|
|
8
8
|
"author": "Google Inc.",
|
|
@@ -18,14 +18,25 @@
|
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"init": "ts-node ./tool/prepare-dev-environment.ts",
|
|
21
|
-
"check": "gts check",
|
|
21
|
+
"check": "npm-run-all check:gts check:tsc",
|
|
22
|
+
"check:gts": "gts check",
|
|
23
|
+
"check:tsc": "tsc --noEmit",
|
|
22
24
|
"clean": "gts clean",
|
|
23
25
|
"compile": "tsc",
|
|
24
26
|
"fix": "gts fix",
|
|
25
|
-
"postinstall": "node ./download-compiler-for-end-user.js",
|
|
26
27
|
"prepublishOnly": "npm run clean && ts-node ./tool/prepare-release.ts",
|
|
27
28
|
"test": "jest"
|
|
28
29
|
},
|
|
30
|
+
"optionalDependencies": {
|
|
31
|
+
"sass-embedded-darwin-arm64": "1.54.8",
|
|
32
|
+
"sass-embedded-darwin-x64": "1.54.8",
|
|
33
|
+
"sass-embedded-linux-arm": "1.54.8",
|
|
34
|
+
"sass-embedded-linux-arm64": "1.54.8",
|
|
35
|
+
"sass-embedded-linux-ia32": "1.54.8",
|
|
36
|
+
"sass-embedded-linux-x64": "1.54.8",
|
|
37
|
+
"sass-embedded-win32-ia32": "1.54.8",
|
|
38
|
+
"sass-embedded-win32-x64": "1.54.8"
|
|
39
|
+
},
|
|
29
40
|
"dependencies": {
|
|
30
41
|
"buffer-builder": "^0.2.0",
|
|
31
42
|
"extract-zip": "^2.0.1",
|
|
@@ -36,7 +47,8 @@
|
|
|
36
47
|
"semver": "^7.3.5",
|
|
37
48
|
"shelljs": "^0.8.4",
|
|
38
49
|
"supports-color": "^8.1.1",
|
|
39
|
-
"tar": "^6.0.5"
|
|
50
|
+
"tar": "^6.0.5",
|
|
51
|
+
"yaml": "^1.10.2"
|
|
40
52
|
},
|
|
41
53
|
"devDependencies": {
|
|
42
54
|
"@types/buffer-builder": "^0.2.0",
|
|
@@ -50,16 +62,16 @@
|
|
|
50
62
|
"@types/tar": "^6.1.0",
|
|
51
63
|
"@types/yargs": "^17.0.4",
|
|
52
64
|
"del": "^6.0.0",
|
|
53
|
-
"gts": "^
|
|
65
|
+
"gts": "^4.0.0",
|
|
54
66
|
"jest": "^27.2.5",
|
|
55
67
|
"minipass": "3.2.1",
|
|
68
|
+
"npm-run-all": "^4.1.5",
|
|
56
69
|
"protoc": "^1.0.4",
|
|
57
70
|
"source-map-js": "^0.6.1",
|
|
58
71
|
"ts-jest": "^27.0.5",
|
|
59
72
|
"ts-node": "^10.2.1",
|
|
60
73
|
"ts-protoc-gen": "^0.15.0",
|
|
61
74
|
"typescript": "^4.4.3",
|
|
62
|
-
"yaml": "^1.10.2",
|
|
63
75
|
"yargs": "^17.2.1"
|
|
64
76
|
}
|
|
65
77
|
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2020 Google Inc. Use of this source code is governed by an
|
|
3
|
+
// MIT-style license that can be found in the LICENSE file or at
|
|
4
|
+
// https://opensource.org/licenses/MIT.
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const yargs_1 = require("yargs");
|
|
7
|
+
const utils_1 = require("./utils");
|
|
8
|
+
const argv = (0, yargs_1.default)(process.argv.slice(2))
|
|
9
|
+
.option('compiler-path', {
|
|
10
|
+
type: 'string',
|
|
11
|
+
description: 'Build the Embedded Dart Sass binary from the source at this path.',
|
|
12
|
+
})
|
|
13
|
+
.option('compiler-ref', {
|
|
14
|
+
type: 'string',
|
|
15
|
+
description: 'Build the Embedded Dart Sass binary from this Git ref.',
|
|
16
|
+
})
|
|
17
|
+
.option('compiler-version', {
|
|
18
|
+
type: 'string',
|
|
19
|
+
description: 'Download this version of the Embedded Dart Sass binary.',
|
|
20
|
+
})
|
|
21
|
+
.option('skip-compiler', {
|
|
22
|
+
type: 'boolean',
|
|
23
|
+
description: "Don't Embedded Dart Sass at all.",
|
|
24
|
+
})
|
|
25
|
+
.option('protocol-path', {
|
|
26
|
+
type: 'string',
|
|
27
|
+
description: 'Build the Embedded Protocol from the source at this path.',
|
|
28
|
+
})
|
|
29
|
+
.option('protocol-ref', {
|
|
30
|
+
type: 'string',
|
|
31
|
+
description: 'Build the Embedded Protocol from this Git ref.',
|
|
32
|
+
})
|
|
33
|
+
.option('protocol-version', {
|
|
34
|
+
type: 'string',
|
|
35
|
+
description: 'Build the Embedded Protocol from this release version.',
|
|
36
|
+
})
|
|
37
|
+
.option('api-path', {
|
|
38
|
+
type: 'string',
|
|
39
|
+
description: 'Use the JS API definitions from the source at this path.',
|
|
40
|
+
})
|
|
41
|
+
.option('api-ref', {
|
|
42
|
+
type: 'string',
|
|
43
|
+
description: 'Build the JS API definitions from this Git ref.',
|
|
44
|
+
})
|
|
45
|
+
.conflicts({
|
|
46
|
+
'compiler-path': ['compiler-ref', 'compiler-version', 'skip-compiler'],
|
|
47
|
+
'compiler-ref': ['compiler-version', 'skip-compiler'],
|
|
48
|
+
'compiler-version': 'skip-compiler',
|
|
49
|
+
'protocol-path': ['protocol-ref', 'protocol-version'],
|
|
50
|
+
'protocol-ref': 'protocol-version',
|
|
51
|
+
'api-path': 'api-ref',
|
|
52
|
+
})
|
|
53
|
+
.parseSync();
|
|
54
|
+
(async () => {
|
|
55
|
+
try {
|
|
56
|
+
const outPath = 'lib/src/vendor';
|
|
57
|
+
const platform = (0, utils_1.nodePlatformToDartPlatform)(process.env.npm_config_platform || process.platform);
|
|
58
|
+
const arch = (0, utils_1.nodeArchToDartArch)(process.env.npm_config_arch || process.arch);
|
|
59
|
+
if (argv['protocol-version']) {
|
|
60
|
+
await (0, utils_1.getEmbeddedProtocol)(outPath, {
|
|
61
|
+
version: argv['protocol-version'],
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
else if (argv['protocol-ref']) {
|
|
65
|
+
await (0, utils_1.getEmbeddedProtocol)(outPath, {
|
|
66
|
+
ref: argv['protocol-ref'],
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
else if (argv['protocol-path']) {
|
|
70
|
+
await (0, utils_1.getEmbeddedProtocol)(outPath, {
|
|
71
|
+
path: argv['protocol-path'],
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
await (0, utils_1.getEmbeddedProtocol)(outPath);
|
|
76
|
+
}
|
|
77
|
+
if (!argv['skip-compiler']) {
|
|
78
|
+
if (argv['compiler-version']) {
|
|
79
|
+
await (0, utils_1.getDartSassEmbedded)(outPath, platform, arch, {
|
|
80
|
+
version: argv['compiler-version'],
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
else if (argv['compiler-ref']) {
|
|
84
|
+
await (0, utils_1.getDartSassEmbedded)(outPath, platform, arch, {
|
|
85
|
+
ref: argv['compiler-ref'],
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
else if (argv['compiler-path']) {
|
|
89
|
+
await (0, utils_1.getDartSassEmbedded)(outPath, platform, arch, {
|
|
90
|
+
path: argv['compiler-path'],
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
await (0, utils_1.getDartSassEmbedded)(outPath, platform, arch);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
if (argv['api-ref']) {
|
|
98
|
+
await (0, utils_1.getJSApi)(outPath, {
|
|
99
|
+
ref: argv['api-ref'],
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
else if (argv['api-path']) {
|
|
103
|
+
await (0, utils_1.getJSApi)(outPath, {
|
|
104
|
+
path: argv['api-path'],
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
await (0, utils_1.getJSApi)(outPath);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
console.error(error);
|
|
113
|
+
process.exitCode = 1;
|
|
114
|
+
}
|
|
115
|
+
})();
|
|
116
|
+
//# sourceMappingURL=prepare-dev-environment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepare-dev-environment.js","sourceRoot":"","sources":["../../tool/prepare-dev-environment.ts"],"names":[],"mappings":";AAAA,uEAAuE;AACvE,gEAAgE;AAChE,uCAAuC;;AAEvC,iCAA0B;AAE1B,mCAMiB;AAEjB,MAAM,IAAI,GAAG,IAAA,eAAK,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACtC,MAAM,CAAC,eAAe,EAAE;IACvB,IAAI,EAAE,QAAQ;IACd,WAAW,EACT,mEAAmE;CACtE,CAAC;KACD,MAAM,CAAC,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;gBACL,MAAM,IAAA,2BAAmB,EAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;aACpD;SACF;QAED,IAAI,IAAI,CAAC,SAAS,CAAC,EAAE;YACnB,MAAM,IAAA,gBAAQ,EAAC,OAAO,EAAE;gBACtB,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC;aACrB,CAAC,CAAC;SACJ;aAAM,IAAI,IAAI,CAAC,UAAU,CAAC,EAAE;YAC3B,MAAM,IAAA,gBAAQ,EAAC,OAAO,EAAE;gBACtB,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC;aACvB,CAAC,CAAC;SACJ;aAAM;YACL,MAAM,IAAA,gBAAQ,EAAC,OAAO,CAAC,CAAC;SACzB;KACF;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;KACtB;AACH,CAAC,CAAC,EAAE,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const yargs_1 = require("yargs");
|
|
4
|
+
const utils_1 = require("./utils");
|
|
5
|
+
const pkg = require("../package.json");
|
|
6
|
+
const argv = (0, yargs_1.default)(process.argv.slice(2))
|
|
7
|
+
.option('package', {
|
|
8
|
+
type: 'string',
|
|
9
|
+
description: 'Directory name under `npm` directory that contains optional dependencies.',
|
|
10
|
+
demandOption: true,
|
|
11
|
+
choices: Object.keys(pkg.optionalDependencies).map(name => name.split('sass-embedded-')[1]),
|
|
12
|
+
})
|
|
13
|
+
.parseSync();
|
|
14
|
+
(async () => {
|
|
15
|
+
try {
|
|
16
|
+
const [platform, arch] = argv.package.split('-');
|
|
17
|
+
await (0, utils_1.getDartSassEmbedded)(`npm/${argv.package}`, (0, utils_1.nodePlatformToDartPlatform)(platform), (0, utils_1.nodeArchToDartArch)(arch));
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
console.error(error);
|
|
21
|
+
process.exitCode = 1;
|
|
22
|
+
}
|
|
23
|
+
})();
|
|
24
|
+
//# sourceMappingURL=prepare-optional-release.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepare-optional-release.js","sourceRoot":"","sources":["../../tool/prepare-optional-release.ts"],"names":[],"mappings":";;AAAA,iCAA0B;AAC1B,mCAIiB;AAEjB,uCAAuC;AAEvC,MAAM,IAAI,GAAG,IAAA,eAAK,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACtC,MAAM,CAAC,SAAS,EAAE;IACjB,IAAI,EAAE,QAAQ;IACd,WAAW,EACT,2EAA2E;IAC7E,YAAY,EAAE,IAAI;IAClB,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC,GAAG,CAChD,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CACxC;CACF,CAAC;KACD,SAAS,EAAE,CAAC;AAEf,CAAC,KAAK,IAAI,EAAE;IACV,IAAI;QACF,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACjD,MAAM,IAAA,2BAAmB,EACvB,OAAO,IAAI,CAAC,OAAO,EAAE,EACrB,IAAA,kCAA0B,EAAC,QAAQ,CAAC,EACpC,IAAA,0BAAkB,EAAC,IAAI,CAAC,CACzB,CAAC;KACH;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;KACtB;AACH,CAAC,CAAC,EAAE,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2021 Google Inc. Use of this source code is governed by an
|
|
3
|
+
// MIT-style license that can be found in the LICENSE file or at
|
|
4
|
+
// https://opensource.org/licenses/MIT.
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const fs_1 = require("fs");
|
|
7
|
+
const shell = require("shelljs");
|
|
8
|
+
const pkg = require("../package.json");
|
|
9
|
+
const utils_1 = require("./utils");
|
|
10
|
+
shell.config.fatal = true;
|
|
11
|
+
(async () => {
|
|
12
|
+
try {
|
|
13
|
+
await sanityCheckBeforeRelease();
|
|
14
|
+
await (0, utils_1.getEmbeddedProtocol)('lib/src/vendor');
|
|
15
|
+
await (0, utils_1.getJSApi)('lib/src/vendor');
|
|
16
|
+
console.log('Transpiling TS into dist.');
|
|
17
|
+
shell.exec('tsc');
|
|
18
|
+
console.log('Copying JS API types to dist.');
|
|
19
|
+
shell.cp('-R', 'lib/src/vendor/sass', 'dist/types');
|
|
20
|
+
await fs_1.promises.unlink('dist/types/README.md');
|
|
21
|
+
// .gitignore needs to exist in dist for `npm publish` to correctly exclude
|
|
22
|
+
// files from the published tarball.
|
|
23
|
+
console.log('Copying .gitignore to dist.');
|
|
24
|
+
await fs_1.promises.copyFile('.gitignore', 'dist/.gitignore');
|
|
25
|
+
console.log('Ready for publishing to npm.');
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
console.error(error);
|
|
29
|
+
process.exitCode = 1;
|
|
30
|
+
}
|
|
31
|
+
})();
|
|
32
|
+
// Quick sanity checks to make sure the release we are preparing is a suitable
|
|
33
|
+
// candidate for release.
|
|
34
|
+
async function sanityCheckBeforeRelease() {
|
|
35
|
+
console.log('Running sanity checks before releasing.');
|
|
36
|
+
const releaseVersion = pkg.version;
|
|
37
|
+
const ref = process.env['GITHUB_REF'];
|
|
38
|
+
if (ref !== `refs/tags/${releaseVersion}`) {
|
|
39
|
+
throw Error(`GITHUB_REF ${ref} is different than the package.json version ${releaseVersion}.`);
|
|
40
|
+
}
|
|
41
|
+
for (const [dep, version] of Object.entries(pkg.optionalDependencies)) {
|
|
42
|
+
if (version !== releaseVersion) {
|
|
43
|
+
throw Error(`optional dependency ${dep}'s version doesn't match ${releaseVersion}.`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (releaseVersion.indexOf('-dev') > 0) {
|
|
47
|
+
throw Error(`${releaseVersion} is a dev release.`);
|
|
48
|
+
}
|
|
49
|
+
const versionHeader = new RegExp(`^## ${releaseVersion}$`, 'm');
|
|
50
|
+
const changelog = await fs_1.promises.readFile('CHANGELOG.md', 'utf8');
|
|
51
|
+
if (!changelog.match(versionHeader)) {
|
|
52
|
+
throw Error(`There's no CHANGELOG entry for ${releaseVersion}.`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=prepare-release.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepare-release.js","sourceRoot":"","sources":["../../tool/prepare-release.ts"],"names":[],"mappings":";AAAA,uEAAuE;AACvE,gEAAgE;AAChE,uCAAuC;;AAEvC,2BAAkC;AAClC,iCAAiC;AAEjC,uCAAuC;AACvC,mCAAsD;AAEtD,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC;AAE1B,CAAC,KAAK,IAAI,EAAE;IACV,IAAI;QACF,MAAM,wBAAwB,EAAE,CAAC;QAEjC,MAAM,IAAA,2BAAmB,EAAC,gBAAgB,CAAC,CAAC;QAE5C,MAAM,IAAA,gBAAQ,EAAC,gBAAgB,CAAC,CAAC;QAEjC,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;QACzC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAElB,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;QAC7C,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,qBAAqB,EAAE,YAAY,CAAC,CAAC;QACpD,MAAM,aAAE,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;QA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AI,CAAC,SAAS,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE;QACnC,MAAM,KAAK,CAAC,kCAAkC,cAAc,GAAG,CAAC,CAAC;KAClE;AACH,CAAC"}
|
package/dist/tool/utils.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// MIT-style license that can be found in the LICENSE file or at
|
|
4
4
|
// https://opensource.org/licenses/MIT.
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getJSApi = exports.getDartSassEmbedded = exports.getEmbeddedProtocol = void 0;
|
|
6
|
+
exports.getJSApi = exports.getDartSassEmbedded = exports.getEmbeddedProtocol = exports.nodeArchToDartArch = exports.nodePlatformToDartPlatform = void 0;
|
|
7
7
|
const make_fetch_happen_1 = require("make-fetch-happen");
|
|
8
8
|
const extractZip = require("extract-zip");
|
|
9
9
|
const fs_1 = require("fs");
|
|
@@ -14,10 +14,12 @@ const tar_1 = require("tar");
|
|
|
14
14
|
const pkg = require("../package.json");
|
|
15
15
|
const fetch = (0, make_fetch_happen_1.defaults)();
|
|
16
16
|
shell.config.fatal = true;
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
// Directory that holds source files.
|
|
18
|
+
const BUILD_PATH = 'build';
|
|
19
|
+
// Converts a Node-style platform name as returned by `process.platform` into a
|
|
20
|
+
// name used by Dart Sass. Throws if the operating system is not supported by
|
|
21
|
+
// Dart Sass Embedded.
|
|
22
|
+
function nodePlatformToDartPlatform(platform) {
|
|
21
23
|
switch (platform) {
|
|
22
24
|
case 'linux':
|
|
23
25
|
return 'linux';
|
|
@@ -28,11 +30,12 @@ const OS = (() => {
|
|
|
28
30
|
default:
|
|
29
31
|
throw Error(`Platform ${platform} is not supported.`);
|
|
30
32
|
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
//
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
}
|
|
34
|
+
exports.nodePlatformToDartPlatform = nodePlatformToDartPlatform;
|
|
35
|
+
// Converts a Node-style architecture name as returned by `process.arch` into a
|
|
36
|
+
// name used by Dart Sass. Throws if the architecture is not supported by Dart
|
|
37
|
+
// Sass Embedded.
|
|
38
|
+
function nodeArchToDartArch(arch) {
|
|
36
39
|
switch (arch) {
|
|
37
40
|
case 'ia32':
|
|
38
41
|
return 'ia32';
|
|
@@ -40,16 +43,19 @@ const ARCH = (() => {
|
|
|
40
43
|
return 'ia32';
|
|
41
44
|
case 'x64':
|
|
42
45
|
return 'x64';
|
|
46
|
+
case 'arm':
|
|
47
|
+
return 'arm';
|
|
43
48
|
case 'arm64':
|
|
44
49
|
return 'arm64';
|
|
45
50
|
default:
|
|
46
51
|
throw Error(`Architecture ${arch} is not supported.`);
|
|
47
52
|
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
}
|
|
54
|
+
exports.nodeArchToDartArch = nodeArchToDartArch;
|
|
55
|
+
// Get the platform's file extension for archives.
|
|
56
|
+
function getArchiveExtension(platform) {
|
|
57
|
+
return platform === 'windows' ? '.zip' : '.tar.gz';
|
|
58
|
+
}
|
|
53
59
|
/**
|
|
54
60
|
* Gets the Embedded Protocol.
|
|
55
61
|
*
|
|
@@ -66,7 +72,7 @@ async function getEmbeddedProtocol(outPath, options) {
|
|
|
66
72
|
const version = options === null || options === void 0 ? void 0 : options.version;
|
|
67
73
|
await downloadRelease({
|
|
68
74
|
repo,
|
|
69
|
-
assetUrl: `https://github.com/sass/${repo}/archive/${version}
|
|
75
|
+
assetUrl: `https://github.com/sass/${repo}/archive/${version}.tar.gz`,
|
|
70
76
|
outPath: BUILD_PATH,
|
|
71
77
|
});
|
|
72
78
|
await fs_1.promises.rename(p.join(BUILD_PATH, `${repo}-${version}`), p.join(BUILD_PATH, repo));
|
|
@@ -92,7 +98,7 @@ exports.getEmbeddedProtocol = getEmbeddedProtocol;
|
|
|
92
98
|
* By default, downloads the release version specified in package.json. Throws
|
|
93
99
|
* if an error occurs.
|
|
94
100
|
*/
|
|
95
|
-
async function getDartSassEmbedded(outPath, options) {
|
|
101
|
+
async function getDartSassEmbedded(outPath, platform, arch, options) {
|
|
96
102
|
const repo = 'dart-sass-embedded';
|
|
97
103
|
options !== null && options !== void 0 ? options : (options = defaultVersionOption('compiler-version'));
|
|
98
104
|
await checkForMusl();
|
|
@@ -102,7 +108,7 @@ async function getDartSassEmbedded(outPath, options) {
|
|
|
102
108
|
repo,
|
|
103
109
|
assetUrl: `https://github.com/sass/${repo}/releases/download/` +
|
|
104
110
|
`${version}/sass_embedded-${version}-` +
|
|
105
|
-
`${
|
|
111
|
+
`${platform}-${arch}${getArchiveExtension(platform)}`,
|
|
106
112
|
outPath,
|
|
107
113
|
});
|
|
108
114
|
await fs_1.promises.rename(p.join(outPath, 'sass_embedded'), p.join(outPath, repo));
|
|
@@ -191,9 +197,12 @@ async function downloadRelease(options) {
|
|
|
191
197
|
const releaseAsset = await response.buffer();
|
|
192
198
|
console.log(`Unzipping ${options.repo} release asset to ${options.outPath}.`);
|
|
193
199
|
await cleanDir(p.join(options.outPath, options.repo));
|
|
194
|
-
const
|
|
200
|
+
const archiveExtension = options.assetUrl.endsWith('.zip')
|
|
201
|
+
? '.zip'
|
|
202
|
+
: '.tar.gz';
|
|
203
|
+
const zippedAssetPath = options.outPath + '/' + options.repo + archiveExtension;
|
|
195
204
|
await fs_1.promises.writeFile(zippedAssetPath, releaseAsset);
|
|
196
|
-
if (
|
|
205
|
+
if (archiveExtension === '.zip') {
|
|
197
206
|
await extractZip(zippedAssetPath, {
|
|
198
207
|
dir: p.join(process.cwd(), options.outPath),
|
|
199
208
|
});
|
|
@@ -227,10 +236,10 @@ function fetchRepo(options) {
|
|
|
227
236
|
function buildEmbeddedProtocol(repoPath) {
|
|
228
237
|
const proto = p.join(repoPath, 'embedded_sass.proto');
|
|
229
238
|
console.log(`Building pbjs and TS declaration file from ${proto}.`);
|
|
230
|
-
const protocPath =
|
|
239
|
+
const protocPath = process.platform === 'win32'
|
|
231
240
|
? '%CD%/node_modules/protoc/protoc/bin/protoc.exe'
|
|
232
241
|
: 'node_modules/protoc/protoc/bin/protoc';
|
|
233
|
-
const pluginPath =
|
|
242
|
+
const pluginPath = process.platform === 'win32'
|
|
234
243
|
? '%CD%/node_modules/.bin/protoc-gen-ts.cmd'
|
|
235
244
|
: 'node_modules/.bin/protoc-gen-ts';
|
|
236
245
|
(0, fs_1.mkdirSync)('build/embedded-protocol', { recursive: true });
|
|
@@ -263,7 +272,7 @@ function defaultVersionOption(pkgField) {
|
|
|
263
272
|
// Links or copies the contents of `source` into `destination`.
|
|
264
273
|
async function link(source, destination) {
|
|
265
274
|
await cleanDir(destination);
|
|
266
|
-
if (
|
|
275
|
+
if (process.platform === 'win32') {
|
|
267
276
|
console.log(`Copying ${source} into ${destination}.`);
|
|
268
277
|
shell.cp('-R', source, destination);
|
|
269
278
|
}
|
package/dist/tool/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../tool/utils.ts"],"names":[],"mappings":";AAAA,uEAAuE;AACvE,gEAAgE;AAChE,uCAAuC;;;AAEvC,yDAAkE;AAClE,0CAA2C;AAC3C,2BAAyD;AACzD,0BAA0B;AAC1B,6BAA6B;AAC7B,iCAAiC;AACjC,6BAA0C;AAE1C,uCAAuC;AAEvC,MAAM,KAAK,GAAG,IAAA,4BAAmB,GAAE,CAAC;AAEpC,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC;AAE1B,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../tool/utils.ts"],"names":[],"mappings":";AAAA,uEAAuE;AACvE,gEAAgE;AAChE,uCAAuC;;;AAEvC,yDAAkE;AAClE,0CAA2C;AAC3C,2BAAyD;AACzD,0BAA0B;AAC1B,6BAA6B;AAC7B,iCAAiC;AACjC,6BAA0C;AAE1C,uCAAuC;AAEvC,MAAM,KAA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AAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAC,GAAG,EAAE,MAAM,EAAC,CAAC,CAAC,CAAC,EAAC,OAAO,EAAC,CAAC;AAC9D,CAAC;AAED,+DAA+D;AAC/D,KAAK,UAAU,IAAI,CAAC,MAAc,EAAE,WAAmB;IACrD,MAAM,QAAQ,CAAC,WAAW,CAAC,CAAC;IAC5B,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;QAChC,OAAO,CAAC,GAAG,CAAC,WAAW,MAAM,SAAS,WAAW,GAAG,CAAC,CAAC;QACtD,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;KACrC;SAAM;QACL,OAAO,CAAC,GAAG,CAAC,WAAW,MAAM,SAAS,WAAW,GAAG,CAAC,CAAC;QACtD,wEAAwE;QACxE,MAAM,aAAE,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,CAAC;KAClD;AACH,CAAC;AAED,oEAAoE;AACpE,KAAK,UAAU,QAAQ,CAAC,GAAW;IACjC,MAAM,aAAE,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,EAAC,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC;IAClD,IAAI;QACF,MAAM,aAAE,CAAC,KAAK,CAAC,GAAG,EAAE,EAAC,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC;KACxC;IAAC,OAAO,CAAC,EAAE;QACV,yCAAyC;KAC1C;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sass-embedded",
|
|
3
|
-
"version": "1.54.
|
|
3
|
+
"version": "1.54.8",
|
|
4
4
|
"protocol-version": "1.1.0",
|
|
5
|
-
"compiler-version": "1.54.
|
|
5
|
+
"compiler-version": "1.54.8",
|
|
6
6
|
"description": "Node.js library that communicates with Embedded Dart Sass using the Embedded Sass protocol",
|
|
7
7
|
"repository": "sass/embedded-host-node",
|
|
8
8
|
"author": "Google Inc.",
|
|
@@ -18,14 +18,25 @@
|
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"init": "ts-node ./tool/prepare-dev-environment.ts",
|
|
21
|
-
"check": "gts check",
|
|
21
|
+
"check": "npm-run-all check:gts check:tsc",
|
|
22
|
+
"check:gts": "gts check",
|
|
23
|
+
"check:tsc": "tsc --noEmit",
|
|
22
24
|
"clean": "gts clean",
|
|
23
25
|
"compile": "tsc",
|
|
24
26
|
"fix": "gts fix",
|
|
25
|
-
"postinstall": "node ./download-compiler-for-end-user.js",
|
|
26
27
|
"prepublishOnly": "npm run clean && ts-node ./tool/prepare-release.ts",
|
|
27
28
|
"test": "jest"
|
|
28
29
|
},
|
|
30
|
+
"optionalDependencies": {
|
|
31
|
+
"sass-embedded-darwin-arm64": "1.54.8",
|
|
32
|
+
"sass-embedded-darwin-x64": "1.54.8",
|
|
33
|
+
"sass-embedded-linux-arm": "1.54.8",
|
|
34
|
+
"sass-embedded-linux-arm64": "1.54.8",
|
|
35
|
+
"sass-embedded-linux-ia32": "1.54.8",
|
|
36
|
+
"sass-embedded-linux-x64": "1.54.8",
|
|
37
|
+
"sass-embedded-win32-ia32": "1.54.8",
|
|
38
|
+
"sass-embedded-win32-x64": "1.54.8"
|
|
39
|
+
},
|
|
29
40
|
"dependencies": {
|
|
30
41
|
"buffer-builder": "^0.2.0",
|
|
31
42
|
"extract-zip": "^2.0.1",
|
|
@@ -36,7 +47,8 @@
|
|
|
36
47
|
"semver": "^7.3.5",
|
|
37
48
|
"shelljs": "^0.8.4",
|
|
38
49
|
"supports-color": "^8.1.1",
|
|
39
|
-
"tar": "^6.0.5"
|
|
50
|
+
"tar": "^6.0.5",
|
|
51
|
+
"yaml": "^1.10.2"
|
|
40
52
|
},
|
|
41
53
|
"devDependencies": {
|
|
42
54
|
"@types/buffer-builder": "^0.2.0",
|
|
@@ -50,16 +62,16 @@
|
|
|
50
62
|
"@types/tar": "^6.1.0",
|
|
51
63
|
"@types/yargs": "^17.0.4",
|
|
52
64
|
"del": "^6.0.0",
|
|
53
|
-
"gts": "^
|
|
65
|
+
"gts": "^4.0.0",
|
|
54
66
|
"jest": "^27.2.5",
|
|
55
67
|
"minipass": "3.2.1",
|
|
68
|
+
"npm-run-all": "^4.1.5",
|
|
56
69
|
"protoc": "^1.0.4",
|
|
57
70
|
"source-map-js": "^0.6.1",
|
|
58
71
|
"ts-jest": "^27.0.5",
|
|
59
72
|
"ts-node": "^10.2.1",
|
|
60
73
|
"ts-protoc-gen": "^0.15.0",
|
|
61
74
|
"typescript": "^4.4.3",
|
|
62
|
-
"yaml": "^1.10.2",
|
|
63
75
|
"yargs": "^17.2.1"
|
|
64
76
|
}
|
|
65
77
|
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// Copyright 2021 Google Inc. Use of this source code is governed by an
|
|
2
|
-
// MIT-style license that can be found in the LICENSE file or at
|
|
3
|
-
// https://opensource.org/licenses/MIT.
|
|
4
|
-
|
|
5
|
-
const fs = require('fs');
|
|
6
|
-
|
|
7
|
-
if (fs.existsSync('.dev')) return;
|
|
8
|
-
|
|
9
|
-
const getDartSassEmbedded = require('./dist/tool/utils.js').getDartSassEmbedded;
|
|
10
|
-
|
|
11
|
-
(async () => {
|
|
12
|
-
try {
|
|
13
|
-
await getDartSassEmbedded('./dist/lib/src/vendor');
|
|
14
|
-
} catch (error) {
|
|
15
|
-
console.error(error);
|
|
16
|
-
process.exitCode = 1;
|
|
17
|
-
}
|
|
18
|
-
})();
|