@bytecodealliance/preview2-shim 0.17.4 → 0.17.5

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.
@@ -4,3 +4,7 @@ let _cwd = '/';
4
4
  export function _setCwd(cwd) {
5
5
  _cwd = cwd;
6
6
  }
7
+
8
+ export function _getCwd() {
9
+ return _cwd;
10
+ }
@@ -1,7 +1,7 @@
1
1
  import { streams } from './io.js';
2
2
  import { environment } from './environment.js';
3
3
 
4
- import { _setCwd } from './config.js';
4
+ import { _setCwd, _getCwd } from './config.js';
5
5
  export { _setCwd } from './config.js';
6
6
 
7
7
  const { InputStream, OutputStream } = streams;
@@ -30,7 +30,7 @@ function getChildEntry(parentEntry, subpath, openFlags) {
30
30
  _rootPreopen &&
31
31
  descriptorGetEntry(_rootPreopen[0]) === parentEntry
32
32
  ) {
33
- subpath = _cwd;
33
+ subpath = _getCwd();
34
34
  if (subpath.startsWith('/') && subpath !== '/') {
35
35
  subpath = subpath.slice(1);
36
36
  }
package/package.json CHANGED
@@ -1,10 +1,36 @@
1
1
  {
2
2
  "name": "@bytecodealliance/preview2-shim",
3
- "version": "0.17.4",
3
+ "version": "0.17.5",
4
4
  "description": "WASI Preview2 shim for JS environments",
5
5
  "author": "Guy Bedford, Eduardo Rodrigues<16357187+eduardomourar@users.noreply.github.com>",
6
+ "contributors": [
7
+ {
8
+ "name": "Guy Bedford"
9
+ },
10
+ {
11
+ "name": "Eduardo Rodrigues",
12
+ "email": "16357187+eduardomourar@users.noreply.github.com"
13
+ },
14
+ {
15
+ "name": "Victor Adossi",
16
+ "email": "vadossi@cosmonic.com"
17
+ }
18
+ ],
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/bytecodealliance/jco.git"
22
+ },
23
+ "license": "(Apache-2.0 WITH LLVM-exception)",
24
+ "bugs": {
25
+ "url": "https://github.com/bytecodealliance/jco/issues"
26
+ },
27
+ "homepage": "https://github.com/bytecodealliance/jco#readme",
6
28
  "type": "module",
7
29
  "types": "./types/index.d.ts",
30
+ "files": [
31
+ "types",
32
+ "lib"
33
+ ],
8
34
  "exports": {
9
35
  ".": {
10
36
  "types": "./types/index.d.ts",
@@ -29,17 +55,10 @@
29
55
  "lint:fix": "npm run lint -- --fix",
30
56
  "test": "vitest run -c test/vitest.ts"
31
57
  },
32
- "files": [
33
- "types",
34
- "lib"
35
- ],
36
- "repository": {
37
- "type": "git",
38
- "url": "git+https://github.com/bytecodealliance/jco.git"
39
- },
40
- "license": "(Apache-2.0 WITH LLVM-exception)",
41
- "bugs": {
42
- "url": "https://github.com/bytecodealliance/jco/issues"
43
- },
44
- "homepage": "https://github.com/bytecodealliance/jco#readme"
58
+ "devDependencies": {
59
+ "@bytecodealliance/componentize-js": "0.19.3",
60
+ "@bytecodealliance/jco": "1.15.2",
61
+ "mime": "^4.0.7",
62
+ "puppeteer": "^24.16.2"
63
+ }
45
64
  }