Skip to content

Commit 8076284

Browse files
nodejs-github-bottargos
authored andcommitted
deps: update cjs-module-lexer to 2.1.0
PR-URL: #57180 Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
1 parent 8644cf3 commit 8076284

File tree

7 files changed

+59
-10
lines changed

7 files changed

+59
-10
lines changed

deps/cjs-module-lexer/README.md

+19
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,25 @@ If you need to build lib/lexer.wat (optional) you must first install
456456
[wabt](https://github.com/WebAssembly/wabt) as a sibling folder to this
457457
project. The wat file is then build by running `make lib/lexer.wat`
458458

459+
### Creating a Release
460+
These are the steps to create and publish a release. You will need docker
461+
installed as well as having installed [wabt](https://github.com/WebAssembly/wabt)
462+
as outlined above:
463+
464+
- [ ] Figure out if the release should be semver patch, minor or major based on the changes since
465+
the last release and determine the new version.
466+
- [ ] Update the package.json version, and run a full build and test
467+
- npm install
468+
- npm run build
469+
- npm run test
470+
- [ ] Commit and tag the changes, pushing up to main and the tag
471+
- For example
472+
- `git tag -a 1.4.2 -m "1.4.2"`
473+
- `git push origin tag 1.4.2`
474+
- [ ] Create the GitHub release
475+
- [ ] Run npm publish from an account with access (asking somebody with access
476+
the nodejs-foundation account is an option if you don't have access.
477+
459478
### License
460479

461480
MIT

deps/cjs-module-lexer/dist/lexer.mjs

+1-1
Large diffs are not rendered by default.

deps/cjs-module-lexer/src/README.md

+19
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,25 @@ If you need to build lib/lexer.wat (optional) you must first install
456456
[wabt](https://github.com/WebAssembly/wabt) as a sibling folder to this
457457
project. The wat file is then build by running `make lib/lexer.wat`
458458

459+
### Creating a Release
460+
These are the steps to create and publish a release. You will need docker
461+
installed as well as having installed [wabt](https://github.com/WebAssembly/wabt)
462+
as outlined above:
463+
464+
- [ ] Figure out if the release should be semver patch, minor or major based on the changes since
465+
the last release and determine the new version.
466+
- [ ] Update the package.json version, and run a full build and test
467+
- npm install
468+
- npm run build
469+
- npm run test
470+
- [ ] Commit and tag the changes, pushing up to main and the tag
471+
- For example
472+
- `git tag -a 1.4.2 -m "1.4.2"`
473+
- `git push origin tag 1.4.2`
474+
- [ ] Create the GitHub release
475+
- [ ] Run npm publish from an account with access (asking somebody with access
476+
the nodejs-foundation account is an option if you don't have access.
477+
459478
### License
460479

461480
MIT

deps/cjs-module-lexer/src/build/Makefile

+16-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
1+
# These flags depend on the system and may be overridden
2+
WASM_CC := clang
3+
WASM_CFLAGS := --sysroot=/usr/share/wasi-sysroot
4+
WASM_LDFLAGS := -nostartfiles
5+
6+
# These are project-specific and are expected to be kept intact
7+
WASM_TARGET := -target wasm32-unknown-wasi
8+
WASM_EXTRA_CFLAGS := -I include-wasm/ -Wno-logical-op-parentheses -Wno-parentheses -Oz
9+
WASM_EXTRA_LDFLAGS := -Wl,-z,stack-size=13312,--no-entry,--compress-relocations,--strip-all
10+
WASM_EXTRA_LDFLAGS += -Wl,--export=__heap_base,--export=parseCJS,--export=sa
11+
WASM_EXTRA_LDFLAGS += -Wl,--export=e,--export=re,--export=es,--export=ee
12+
WASM_EXTRA_LDFLAGS += -Wl,--export=rre,--export=ree,--export=res,--export=ru,--export=us,--export=ue
13+
114
lib/lexer.wasm: include-wasm/cjs-module-lexer.h src/lexer.c
215
@mkdir -p lib
3-
clang --sysroot=/usr/share/wasi-sysroot -target wasm32-unknown-wasi src/lexer.c -I include-wasm -o lib/lexer.wasm -nostartfiles \
4-
-Wl,-z,stack-size=13312,--no-entry,--compress-relocations,--strip-all,--export=__heap_base,\
5-
--export=parseCJS,--export=sa,--export=e,--export=re,--export=es,--export=ee,--export=rre,--export=ree,--export=res,--export=ru,--export=us,--export=ue \
6-
-Wno-logical-op-parentheses -Wno-parentheses \
7-
-Oz
16+
$(WASM_CC) $(WASM_CFLAGS) $(WASM_TARGET) $(WASM_EXTRA_CFLAGS) \
17+
src/lexer.c -o lib/lexer.wasm \
18+
$(WASM_LDFLAGS) $(WASM_EXTRA_LDFLAGS)
819

920
optimize: lib/lexer.wasm
1021
${WASM_OPT} -Oz lib/lexer.wasm -o lib/lexer.wasm

deps/cjs-module-lexer/src/package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deps/cjs-module-lexer/src/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cjs-module-lexer",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"description": "Lexes CommonJS modules, returning their named exports metadata",
55
"main": "lexer.js",
66
"exports": {

src/cjs_module_lexer_version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
// Refer to tools/dep_updaters/update-cjs-module-lexer.sh
33
#ifndef SRC_CJS_MODULE_LEXER_VERSION_H_
44
#define SRC_CJS_MODULE_LEXER_VERSION_H_
5-
#define CJS_MODULE_LEXER_VERSION "2.0.0"
5+
#define CJS_MODULE_LEXER_VERSION "2.1.0"
66
#endif // SRC_CJS_MODULE_LEXER_VERSION_H_

0 commit comments

Comments
 (0)