@tailwindcss/oxide-wasm32-wasi 0.0.0-insiders.d801d8d

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.
Files changed (113) hide show
  1. package/README.md +3 -0
  2. package/node_modules/@emnapi/core/LICENSE +21 -0
  3. package/node_modules/@emnapi/core/README.md +1 -0
  4. package/node_modules/@emnapi/core/dist/emnapi-core.cjs.js +6661 -0
  5. package/node_modules/@emnapi/core/dist/emnapi-core.cjs.min.d.ts +363 -0
  6. package/node_modules/@emnapi/core/dist/emnapi-core.cjs.min.js +1 -0
  7. package/node_modules/@emnapi/core/dist/emnapi-core.d.mts +363 -0
  8. package/node_modules/@emnapi/core/dist/emnapi-core.d.ts +365 -0
  9. package/node_modules/@emnapi/core/dist/emnapi-core.esm-bundler.js +7411 -0
  10. package/node_modules/@emnapi/core/dist/emnapi-core.js +8390 -0
  11. package/node_modules/@emnapi/core/dist/emnapi-core.min.d.mts +363 -0
  12. package/node_modules/@emnapi/core/dist/emnapi-core.min.js +1 -0
  13. package/node_modules/@emnapi/core/dist/emnapi-core.min.mjs +1 -0
  14. package/node_modules/@emnapi/core/dist/emnapi-core.mjs +6650 -0
  15. package/node_modules/@emnapi/core/index.js +5 -0
  16. package/node_modules/@emnapi/core/package.json +49 -0
  17. package/node_modules/@emnapi/runtime/LICENSE +21 -0
  18. package/node_modules/@emnapi/runtime/README.md +1 -0
  19. package/node_modules/@emnapi/runtime/dist/emnapi.cjs.js +1347 -0
  20. package/node_modules/@emnapi/runtime/dist/emnapi.cjs.min.d.ts +663 -0
  21. package/node_modules/@emnapi/runtime/dist/emnapi.cjs.min.js +1 -0
  22. package/node_modules/@emnapi/runtime/dist/emnapi.d.mts +663 -0
  23. package/node_modules/@emnapi/runtime/dist/emnapi.d.ts +665 -0
  24. package/node_modules/@emnapi/runtime/dist/emnapi.esm-bundler.js +1403 -0
  25. package/node_modules/@emnapi/runtime/dist/emnapi.iife.d.ts +420 -0
  26. package/node_modules/@emnapi/runtime/dist/emnapi.iife.js +1474 -0
  27. package/node_modules/@emnapi/runtime/dist/emnapi.js +1475 -0
  28. package/node_modules/@emnapi/runtime/dist/emnapi.min.d.mts +663 -0
  29. package/node_modules/@emnapi/runtime/dist/emnapi.min.js +1 -0
  30. package/node_modules/@emnapi/runtime/dist/emnapi.min.mjs +1 -0
  31. package/node_modules/@emnapi/runtime/dist/emnapi.mjs +1316 -0
  32. package/node_modules/@emnapi/runtime/index.js +5 -0
  33. package/node_modules/@emnapi/runtime/package.json +48 -0
  34. package/node_modules/@emnapi/wasi-threads/LICENSE +21 -0
  35. package/node_modules/@emnapi/wasi-threads/README.md +203 -0
  36. package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.cjs.js +881 -0
  37. package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.cjs.min.d.ts +214 -0
  38. package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.cjs.min.js +1 -0
  39. package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.d.mts +214 -0
  40. package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.d.ts +216 -0
  41. package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.esm-bundler.js +929 -0
  42. package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.js +941 -0
  43. package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.min.d.mts +214 -0
  44. package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.min.js +1 -0
  45. package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.min.mjs +1 -0
  46. package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.mjs +876 -0
  47. package/node_modules/@emnapi/wasi-threads/index.js +5 -0
  48. package/node_modules/@emnapi/wasi-threads/package.json +50 -0
  49. package/node_modules/@napi-rs/wasm-runtime/LICENSE +43 -0
  50. package/node_modules/@napi-rs/wasm-runtime/dist/fs.js +23712 -0
  51. package/node_modules/@napi-rs/wasm-runtime/dist/runtime.js +12269 -0
  52. package/node_modules/@napi-rs/wasm-runtime/fs-proxy.cjs +193 -0
  53. package/node_modules/@napi-rs/wasm-runtime/package.json +60 -0
  54. package/node_modules/@napi-rs/wasm-runtime/runtime.cjs +15 -0
  55. package/node_modules/@tybys/wasm-util/README.md +193 -0
  56. package/node_modules/@tybys/wasm-util/dist/tsdoc-metadata.json +11 -0
  57. package/node_modules/@tybys/wasm-util/dist/wasm-util.d.ts +417 -0
  58. package/node_modules/@tybys/wasm-util/dist/wasm-util.esm-bundler.js +2738 -0
  59. package/node_modules/@tybys/wasm-util/dist/wasm-util.esm.js +2738 -0
  60. package/node_modules/@tybys/wasm-util/dist/wasm-util.esm.min.js +1 -0
  61. package/node_modules/@tybys/wasm-util/dist/wasm-util.js +2760 -0
  62. package/node_modules/@tybys/wasm-util/dist/wasm-util.min.js +1 -0
  63. package/node_modules/@tybys/wasm-util/lib/cjs/asyncify.js +158 -0
  64. package/node_modules/@tybys/wasm-util/lib/cjs/index.js +13 -0
  65. package/node_modules/@tybys/wasm-util/lib/cjs/jspi.js +46 -0
  66. package/node_modules/@tybys/wasm-util/lib/cjs/load.js +97 -0
  67. package/node_modules/@tybys/wasm-util/lib/cjs/memory.js +35 -0
  68. package/node_modules/@tybys/wasm-util/lib/cjs/wasi/error.js +103 -0
  69. package/node_modules/@tybys/wasm-util/lib/cjs/wasi/fd.js +268 -0
  70. package/node_modules/@tybys/wasm-util/lib/cjs/wasi/fs.js +3 -0
  71. package/node_modules/@tybys/wasm-util/lib/cjs/wasi/index.js +194 -0
  72. package/node_modules/@tybys/wasm-util/lib/cjs/wasi/path.js +174 -0
  73. package/node_modules/@tybys/wasm-util/lib/cjs/wasi/preview1.js +1544 -0
  74. package/node_modules/@tybys/wasm-util/lib/cjs/wasi/rights.js +141 -0
  75. package/node_modules/@tybys/wasm-util/lib/cjs/wasi/types.js +220 -0
  76. package/node_modules/@tybys/wasm-util/lib/cjs/wasi/util.js +128 -0
  77. package/node_modules/@tybys/wasm-util/lib/cjs/webassembly.js +13 -0
  78. package/node_modules/@tybys/wasm-util/lib/mjs/asyncify.mjs +153 -0
  79. package/node_modules/@tybys/wasm-util/lib/mjs/index.mjs +9 -0
  80. package/node_modules/@tybys/wasm-util/lib/mjs/jspi.mjs +39 -0
  81. package/node_modules/@tybys/wasm-util/lib/mjs/load.mjs +89 -0
  82. package/node_modules/@tybys/wasm-util/lib/mjs/memory.mjs +28 -0
  83. package/node_modules/@tybys/wasm-util/lib/mjs/wasi/error.mjs +97 -0
  84. package/node_modules/@tybys/wasm-util/lib/mjs/wasi/fd.mjs +256 -0
  85. package/node_modules/@tybys/wasm-util/lib/mjs/wasi/fs.mjs +1 -0
  86. package/node_modules/@tybys/wasm-util/lib/mjs/wasi/index.mjs +188 -0
  87. package/node_modules/@tybys/wasm-util/lib/mjs/wasi/path.mjs +168 -0
  88. package/node_modules/@tybys/wasm-util/lib/mjs/wasi/preview1.mjs +1539 -0
  89. package/node_modules/@tybys/wasm-util/lib/mjs/wasi/rights.mjs +135 -0
  90. package/node_modules/@tybys/wasm-util/lib/mjs/wasi/types.mjs +216 -0
  91. package/node_modules/@tybys/wasm-util/lib/mjs/wasi/util.mjs +113 -0
  92. package/node_modules/@tybys/wasm-util/lib/mjs/webassembly.mjs +9 -0
  93. package/node_modules/@tybys/wasm-util/package.json +58 -0
  94. package/node_modules/tslib/CopyrightNotice.txt +15 -0
  95. package/node_modules/tslib/LICENSE.txt +12 -0
  96. package/node_modules/tslib/README.md +164 -0
  97. package/node_modules/tslib/SECURITY.md +41 -0
  98. package/node_modules/tslib/modules/index.d.ts +38 -0
  99. package/node_modules/tslib/modules/index.js +70 -0
  100. package/node_modules/tslib/modules/package.json +3 -0
  101. package/node_modules/tslib/package.json +47 -0
  102. package/node_modules/tslib/tslib.d.ts +460 -0
  103. package/node_modules/tslib/tslib.es6.html +1 -0
  104. package/node_modules/tslib/tslib.es6.js +393 -0
  105. package/node_modules/tslib/tslib.es6.mjs +392 -0
  106. package/node_modules/tslib/tslib.html +1 -0
  107. package/node_modules/tslib/tslib.js +475 -0
  108. package/package.json +45 -0
  109. package/tailwindcss-oxide.wasi-browser.js +63 -0
  110. package/tailwindcss-oxide.wasi.cjs +88 -0
  111. package/tailwindcss-oxide.wasm32-wasi.wasm +0 -0
  112. package/wasi-worker-browser.mjs +39 -0
  113. package/wasi-worker.mjs +63 -0
@@ -0,0 +1,188 @@
1
+ import { WASI as WASIPreview1 } from "./preview1.mjs";
2
+ import { validateObject, validateArray, validateBoolean, validateFunction, validateUndefined, validateString } from "./util.mjs";
3
+ // eslint-disable-next-line spaced-comment
4
+ const kEmptyObject = /*#__PURE__*/ Object.freeze(/*#__PURE__*/ Object.create(null));
5
+ const kExitCode = Symbol('kExitCode');
6
+ const kSetMemory = Symbol('kSetMemory');
7
+ const kStarted = Symbol('kStarted');
8
+ const kInstance = Symbol('kInstance');
9
+ const kBindingName = Symbol('kBindingName');
10
+ function setupInstance(self, instance) {
11
+ validateObject(instance, 'instance');
12
+ validateObject(instance.exports, 'instance.exports');
13
+ self[kInstance] = instance;
14
+ self[kSetMemory](instance.exports.memory);
15
+ }
16
+ function validateOptions(options) {
17
+ var _a;
18
+ validateObject(options, 'options');
19
+ let _WASI;
20
+ if (options.version !== undefined) {
21
+ validateString(options.version, 'options.version');
22
+ switch (options.version) {
23
+ case 'unstable':
24
+ _WASI = WASIPreview1;
25
+ this[kBindingName] = 'wasi_unstable';
26
+ break;
27
+ case 'preview1':
28
+ _WASI = WASIPreview1;
29
+ this[kBindingName] = 'wasi_snapshot_preview1';
30
+ break;
31
+ default:
32
+ throw new TypeError(`unsupported WASI version "${options.version}"`);
33
+ }
34
+ }
35
+ else {
36
+ _WASI = WASIPreview1;
37
+ this[kBindingName] = 'wasi_snapshot_preview1';
38
+ }
39
+ if (options.args !== undefined) {
40
+ validateArray(options.args, 'options.args');
41
+ }
42
+ const args = ((_a = options.args) !== null && _a !== void 0 ? _a : []).map(String);
43
+ const env = [];
44
+ if (options.env !== undefined) {
45
+ validateObject(options.env, 'options.env');
46
+ Object.entries(options.env).forEach(({ 0: key, 1: value }) => {
47
+ if (value !== undefined) {
48
+ env.push(`${key}=${value}`);
49
+ }
50
+ });
51
+ }
52
+ const preopens = [];
53
+ if (options.preopens !== undefined) {
54
+ validateObject(options.preopens, 'options.preopens');
55
+ Object.entries(options.preopens).forEach(({ 0: key, 1: value }) => preopens.push({ mappedPath: String(key), realPath: String(value) }));
56
+ }
57
+ if (preopens.length > 0) {
58
+ if (options.fs === undefined) {
59
+ throw new Error('filesystem is disabled, can not preopen directory');
60
+ }
61
+ try {
62
+ validateObject(options.fs, 'options.fs');
63
+ }
64
+ catch (_) {
65
+ throw new TypeError('Node.js fs like implementation is not provided');
66
+ }
67
+ }
68
+ // if (options.filesystem !== undefined) {
69
+ // validateObject(options.filesystem, 'options.filesystem')
70
+ // validateString(options.filesystem.type, 'options.filesystem.type')
71
+ // if (options.filesystem.type !== 'memfs' && options.filesystem.type !== 'file-system-access-api') {
72
+ // throw new Error(`Filesystem type ${(options.filesystem as any).type as string} is not supported, only "memfs" and "file-system-access-api" is supported currently`)
73
+ // }
74
+ // try {
75
+ // validateObject(options.filesystem.fs, 'options.filesystem.fs')
76
+ // } catch (_) {
77
+ // throw new Error('Node.js fs like implementation is not provided')
78
+ // }
79
+ // }
80
+ if (options.print !== undefined)
81
+ validateFunction(options.print, 'options.print');
82
+ if (options.printErr !== undefined)
83
+ validateFunction(options.printErr, 'options.printErr');
84
+ if (options.returnOnExit !== undefined) {
85
+ validateBoolean(options.returnOnExit, 'options.returnOnExit');
86
+ }
87
+ // const { stdin = 0, stdout = 1, stderr = 2 } = options
88
+ // validateInt32(stdin, 'options.stdin', 0)
89
+ // validateInt32(stdout, 'options.stdout', 0)
90
+ // validateInt32(stderr, 'options.stderr', 0)
91
+ // const stdio = [stdin, stdout, stderr] as const
92
+ const stdio = [0, 1, 2];
93
+ return {
94
+ args,
95
+ env,
96
+ preopens,
97
+ stdio,
98
+ _WASI
99
+ };
100
+ }
101
+ function initWASI(setMemory, wrap) {
102
+ this[kSetMemory] = setMemory;
103
+ this.wasiImport = wrap;
104
+ this[kStarted] = false;
105
+ this[kExitCode] = 0;
106
+ this[kInstance] = undefined;
107
+ }
108
+ /** @public */
109
+ export class WASI {
110
+ constructor(options = kEmptyObject) {
111
+ const { args, env, preopens, stdio, _WASI } = validateOptions.call(this, options);
112
+ const wrap = _WASI.createSync(args, env, preopens, stdio, options.fs, options.print, options.printErr);
113
+ const setMemory = wrap._setMemory;
114
+ delete wrap._setMemory;
115
+ initWASI.call(this, setMemory, wrap);
116
+ if (options.returnOnExit) {
117
+ wrap.proc_exit = wasiReturnOnProcExit.bind(this);
118
+ }
119
+ }
120
+ // Must not export _initialize, must export _start
121
+ start(instance) {
122
+ if (this[kStarted]) {
123
+ throw new Error('WASI instance has already started');
124
+ }
125
+ this[kStarted] = true;
126
+ setupInstance(this, instance);
127
+ const { _start, _initialize } = this[kInstance].exports;
128
+ validateFunction(_start, 'instance.exports._start');
129
+ validateUndefined(_initialize, 'instance.exports._initialize');
130
+ let ret;
131
+ try {
132
+ ret = _start();
133
+ }
134
+ catch (err) {
135
+ if (err !== kExitCode) {
136
+ throw err;
137
+ }
138
+ }
139
+ if (ret instanceof Promise) {
140
+ return ret.then(() => this[kExitCode], (err) => {
141
+ if (err !== kExitCode) {
142
+ throw err;
143
+ }
144
+ return this[kExitCode];
145
+ });
146
+ }
147
+ return this[kExitCode];
148
+ }
149
+ // Must not export _start, may optionally export _initialize
150
+ initialize(instance) {
151
+ if (this[kStarted]) {
152
+ throw new Error('WASI instance has already started');
153
+ }
154
+ this[kStarted] = true;
155
+ setupInstance(this, instance);
156
+ const { _start, _initialize } = this[kInstance].exports;
157
+ validateUndefined(_start, 'instance.exports._start');
158
+ if (_initialize !== undefined) {
159
+ validateFunction(_initialize, 'instance.exports._initialize');
160
+ return _initialize();
161
+ }
162
+ }
163
+ getImportObject() {
164
+ return { [this[kBindingName]]: this.wasiImport };
165
+ }
166
+ }
167
+ function wasiReturnOnProcExit(rval) {
168
+ this[kExitCode] = rval;
169
+ // eslint-disable-next-line @typescript-eslint/no-throw-literal
170
+ throw kExitCode;
171
+ }
172
+ /** @public */
173
+ export async function createAsyncWASI(options = kEmptyObject) {
174
+ const _this = Object.create(WASI.prototype);
175
+ const { args, env, preopens, stdio, _WASI } = validateOptions.call(_this, options);
176
+ if (options.asyncify !== undefined) {
177
+ validateObject(options.asyncify, 'options.asyncify');
178
+ validateFunction(options.asyncify.wrapImportFunction, 'options.asyncify.wrapImportFunction');
179
+ }
180
+ const wrap = await _WASI.createAsync(args, env, preopens, stdio, options.fs, options.print, options.printErr, options.asyncify);
181
+ const setMemory = wrap._setMemory;
182
+ delete wrap._setMemory;
183
+ initWASI.call(_this, setMemory, wrap);
184
+ if (options.returnOnExit) {
185
+ wrap.proc_exit = wasiReturnOnProcExit.bind(_this);
186
+ }
187
+ return _this;
188
+ }
@@ -0,0 +1,168 @@
1
+ import { validateString } from "./util.mjs";
2
+ const CHAR_DOT = 46; /* . */
3
+ const CHAR_FORWARD_SLASH = 47; /* / */
4
+ function isPosixPathSeparator(code) {
5
+ return code === CHAR_FORWARD_SLASH;
6
+ }
7
+ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
8
+ let res = '';
9
+ let lastSegmentLength = 0;
10
+ let lastSlash = -1;
11
+ let dots = 0;
12
+ let code = 0;
13
+ for (let i = 0; i <= path.length; ++i) {
14
+ if (i < path.length) {
15
+ code = path.charCodeAt(i);
16
+ }
17
+ else if (isPathSeparator(code)) {
18
+ break;
19
+ }
20
+ else {
21
+ code = CHAR_FORWARD_SLASH;
22
+ }
23
+ if (isPathSeparator(code)) {
24
+ if (lastSlash === i - 1 || dots === 1) {
25
+ // NOOP
26
+ }
27
+ else if (dots === 2) {
28
+ if (res.length < 2 || lastSegmentLength !== 2 ||
29
+ res.charCodeAt(res.length - 1) !== CHAR_DOT ||
30
+ res.charCodeAt(res.length - 2) !== CHAR_DOT) {
31
+ if (res.length > 2) {
32
+ const lastSlashIndex = res.indexOf(separator);
33
+ if (lastSlashIndex === -1) {
34
+ res = '';
35
+ lastSegmentLength = 0;
36
+ }
37
+ else {
38
+ res = res.slice(0, lastSlashIndex);
39
+ lastSegmentLength =
40
+ res.length - 1 - res.indexOf(separator);
41
+ }
42
+ lastSlash = i;
43
+ dots = 0;
44
+ continue;
45
+ }
46
+ else if (res.length !== 0) {
47
+ res = '';
48
+ lastSegmentLength = 0;
49
+ lastSlash = i;
50
+ dots = 0;
51
+ continue;
52
+ }
53
+ }
54
+ if (allowAboveRoot) {
55
+ res += res.length > 0 ? `${separator}..` : '..';
56
+ lastSegmentLength = 2;
57
+ }
58
+ }
59
+ else {
60
+ if (res.length > 0) {
61
+ res += `${separator}${path.slice(lastSlash + 1, i)}`;
62
+ }
63
+ else {
64
+ res = path.slice(lastSlash + 1, i);
65
+ }
66
+ lastSegmentLength = i - lastSlash - 1;
67
+ }
68
+ lastSlash = i;
69
+ dots = 0;
70
+ }
71
+ else if (code === CHAR_DOT && dots !== -1) {
72
+ ++dots;
73
+ }
74
+ else {
75
+ dots = -1;
76
+ }
77
+ }
78
+ return res;
79
+ }
80
+ export function resolve(...args) {
81
+ let resolvedPath = '';
82
+ let resolvedAbsolute = false;
83
+ for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {
84
+ const path = i >= 0 ? args[i] : '/';
85
+ validateString(path, 'path');
86
+ // Skip empty entries
87
+ if (path.length === 0) {
88
+ continue;
89
+ }
90
+ resolvedPath = `${path}/${resolvedPath}`;
91
+ resolvedAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH;
92
+ }
93
+ // At this point the path should be resolved to a full absolute path, but
94
+ // handle relative paths to be safe (might happen when process.cwd() fails)
95
+ // Normalize the path
96
+ resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute, '/', isPosixPathSeparator);
97
+ if (resolvedAbsolute) {
98
+ return `/${resolvedPath}`;
99
+ }
100
+ return resolvedPath.length > 0 ? resolvedPath : '.';
101
+ }
102
+ export function relative(from, to) {
103
+ validateString(from, 'from');
104
+ validateString(to, 'to');
105
+ if (from === to)
106
+ return '';
107
+ // Trim leading forward slashes.
108
+ from = resolve(from);
109
+ to = resolve(to);
110
+ if (from === to)
111
+ return '';
112
+ const fromStart = 1;
113
+ const fromEnd = from.length;
114
+ const fromLen = fromEnd - fromStart;
115
+ const toStart = 1;
116
+ const toLen = to.length - toStart;
117
+ // Compare paths to find the longest common path from root
118
+ const length = (fromLen < toLen ? fromLen : toLen);
119
+ let lastCommonSep = -1;
120
+ let i = 0;
121
+ for (; i < length; i++) {
122
+ const fromCode = from.charCodeAt(fromStart + i);
123
+ if (fromCode !== to.charCodeAt(toStart + i)) {
124
+ break;
125
+ }
126
+ else if (fromCode === CHAR_FORWARD_SLASH) {
127
+ lastCommonSep = i;
128
+ }
129
+ }
130
+ if (i === length) {
131
+ if (toLen > length) {
132
+ if (to.charCodeAt(toStart + i) === CHAR_FORWARD_SLASH) {
133
+ // We get here if `from` is the exact base path for `to`.
134
+ // For example: from='/foo/bar'; to='/foo/bar/baz'
135
+ return to.slice(toStart + i + 1);
136
+ }
137
+ if (i === 0) {
138
+ // We get here if `from` is the root
139
+ // For example: from='/'; to='/foo'
140
+ return to.slice(toStart + i);
141
+ }
142
+ }
143
+ else if (fromLen > length) {
144
+ if (from.charCodeAt(fromStart + i) === CHAR_FORWARD_SLASH) {
145
+ // We get here if `to` is the exact base path for `from`.
146
+ // For example: from='/foo/bar/baz'; to='/foo/bar'
147
+ lastCommonSep = i;
148
+ }
149
+ else if (i === 0) {
150
+ // We get here if `to` is the root.
151
+ // For example: from='/foo/bar'; to='/'
152
+ lastCommonSep = 0;
153
+ }
154
+ }
155
+ }
156
+ let out = '';
157
+ // Generate the relative path based on the path difference between `to`
158
+ // and `from`.
159
+ for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {
160
+ if (i === fromEnd ||
161
+ from.charCodeAt(i) === CHAR_FORWARD_SLASH) {
162
+ out += out.length === 0 ? '..' : '/..';
163
+ }
164
+ }
165
+ // Lastly, append the rest of the destination (`to`) path that comes after
166
+ // the common path parts.
167
+ return `${out}${to.slice(toStart + lastCommonSep)}`;
168
+ }