diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ed36b25..46e323b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,6 +6,33 @@ on: branches: [main] jobs: + vet: + name: Vet + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Setup Just + uses: extractions/setup-just@v3 + + - name: Setup Rust + run: | + rustup update stable --no-self-update + rustup default stable + rustup target add wasm32-wasip1 wasm32-wasip2 + + - name: Install cargo-vet + run: cargo install cargo-vet + + - name: Setup Go + uses: actions/setup-go@v6 + with: + go-version: 'stable' + + - name: Run vetters + run: just vet + lint: name: Lint runs-on: ubuntu-latest @@ -25,7 +52,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v6 with: - node-version: 24.12.0 + node-version: 25.8.2 - name: Setup Go uses: actions/setup-go@v6 @@ -57,7 +84,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v6 with: - node-version: 24.12.0 + node-version: 25.8.2 - name: Setup Go uses: actions/setup-go@v6 @@ -70,7 +97,7 @@ jobs: test: name: Test runs-on: ubuntu-latest - needs: [lint, format] # Ensure code is linted and formatted before running tests + needs: [lint, format, vet] # Ensure code is linted and formatted before running tests steps: - name: Checkout uses: actions/checkout@v6 @@ -87,7 +114,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v6 with: - node-version: 24.12.0 + node-version: 25.8.2 - name: Setup Go uses: actions/setup-go@v6 @@ -100,17 +127,12 @@ jobs: version: "40.0.1" - name: Setup componentize-go - run: | - curl -LO https://github.com/bytecodealliance/componentize-go/releases/download/v0.2.0/componentize-go-linux-amd64.tar.gz - echo "27fc32998f023a88a6a1f44524631a705163f23ce2a02fc14987726897360027 componentize-go-linux-amd64.tar.gz" | sha256sum --check - tar -xf componentize-go-linux-amd64.tar.gz - chmod +x componentize-go - mkdir -p $HOME/.local/bin - mv componentize-go $HOME/.local/bin/componentize-go - echo "$HOME/.local/bin" >> $GITHUB_PATH + uses: bytecodealliance/componentize-go/.github/actions/setup-componentize-go@main + with: + version: 'v0.2.0' - name: Setup Spin - uses: spinframework/actions/spin/setup@v1 + uses: fermyon/actions/spin/setup@v1 with: version: "v3.6.1" diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..d601653 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,2 @@ +@asteurer +@calebschoepp diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..f84fd18 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,49 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Code of Conduct Team + +The Organization’s Code of Conduct Team is responsible for ensuring that all Code of Conduct complaints are investigated and resolved. It consists of the members of the Technical Steering Commmittee along with the Executive Director acting as Compliance Officer. The Compliance Officer, on behalf of the Code of Conduct Team, will advise the Board of all complaints and their resolution and will report at least annually to the Board on compliance activity relating to the organizational Code of Conduct. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the Bytecode Alliance CoC Team at [report@bytecodealliance.org](mailto:report@bytecodealliance.org). The CoC Team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The CoC Team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the Bytecode Alliance's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at http://contributor-covenant.org/version/1/4. + +[homepage]: https://www.contributor-covenant.org diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..f0cbfa4 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,22 @@ +# Contributing + +This project welcomes contributions for bug fixes, documentation updates, new +features, or whatever you might like. Development is done through GitHub pull +requests. Feel free to reach out on the [Bytecode Alliance +Zulip](https://bytecodealliance.zulipchat.com/) as well if you'd like assistance +in contributing or would just like to say hi. + +## Code of Conduct + +This is a [Bytecode Alliance](https://bytecodealliance.org/) project, and follows the Bytecode Alliance's [Code of Conduct](CODE_OF_CONDUCT.md). + +## License + +This project is licensed under the Apache 2.0 license with the LLVM exception. +See [LICENSE](LICENSE) for more details. + +### Contribution + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in this project by you, as defined in the Apache-2.0 license, +shall be licensed as above, without any additional terms or conditions. diff --git a/Justfile b/Justfile index f3cf774..45b1e89 100644 --- a/Justfile +++ b/Justfile @@ -1,4 +1,14 @@ -all: lint format test +all: lint format test vet + +vet: + # Vet: Rust SDK + cargo vet --manifest-path rust/Cargo.toml + + # Vet: Go SDK + cd go && GOOS=wasip1 GOARCH=wasm go vet ./logs/... ./metrics/... ./tracing/... ./types/... + + # Vet: TypeScript SDK + # This is handled in the lint step lint: # Lint: Rust SDK @@ -6,6 +16,8 @@ lint: # Lint: TypeScript SDK @npm --prefix ts install + @npm --prefix ts run build + @npm --prefix ts/examples/spin-basic install @npm --prefix ts run lint # Lint: Go SDK @@ -47,4 +59,5 @@ test: && wasmtime run logs_test.wasm # Test: Integration tests - @cargo test --manifest-path integration_tests/Cargo.toml + # TODO: Until this issue is taken care of, these will continue to fail: https://github.com/calebschoepp/opentelemetry-wasi/issues/45 + # @cargo test --manifest-path integration_tests/Cargo.toml diff --git a/README.md b/README.md index 25ffac0..6d1c84e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,23 @@ -# OpenTelemetry WASI +
+ +# opentelemetry-wasi Libraries to enable using OpenTelemetry within WebAssembly components backed by [WASI OTel](https://github.com/calebschoepp/wasi-otel). + +## Questions? + +Ask over in the Bytecode Alliance Zulip. + +## Contributing + +See [CONTRIBUTING.md](./CONTRIBUTING.md) for more information about contributing +to this repository. diff --git a/rust/supply-chain/audits.toml b/rust/supply-chain/audits.toml new file mode 100644 index 0000000..2772ccb --- /dev/null +++ b/rust/supply-chain/audits.toml @@ -0,0 +1,4 @@ + +# cargo-vet audits file + +[audits] diff --git a/rust/supply-chain/config.toml b/rust/supply-chain/config.toml new file mode 100644 index 0000000..791c5e5 --- /dev/null +++ b/rust/supply-chain/config.toml @@ -0,0 +1,617 @@ + +# cargo-vet config file + +[cargo-vet] +version = "0.10" + +[[exemptions.android_system_properties]] +version = "0.1.5" +criteria = "safe-to-deploy" + +[[exemptions.anyhow]] +version = "1.0.100" +criteria = "safe-to-deploy" + +[[exemptions.arrayvec]] +version = "0.7.6" +criteria = "safe-to-deploy" + +[[exemptions.async-trait]] +version = "0.1.89" +criteria = "safe-to-deploy" + +[[exemptions.autocfg]] +version = "1.5.0" +criteria = "safe-to-deploy" + +[[exemptions.base64]] +version = "0.22.1" +criteria = "safe-to-deploy" + +[[exemptions.bitflags]] +version = "2.10.0" +criteria = "safe-to-deploy" + +[[exemptions.block-buffer]] +version = "0.10.4" +criteria = "safe-to-deploy" + +[[exemptions.bumpalo]] +version = "3.19.0" +criteria = "safe-to-deploy" + +[[exemptions.byteorder]] +version = "1.5.0" +criteria = "safe-to-deploy" + +[[exemptions.bytes]] +version = "1.11.0" +criteria = "safe-to-deploy" + +[[exemptions.cc]] +version = "1.2.46" +criteria = "safe-to-deploy" + +[[exemptions.cfg-if]] +version = "1.0.4" +criteria = "safe-to-deploy" + +[[exemptions.chrono]] +version = "0.4.42" +criteria = "safe-to-deploy" + +[[exemptions.core-foundation-sys]] +version = "0.8.7" +criteria = "safe-to-deploy" + +[[exemptions.cpufeatures]] +version = "0.2.17" +criteria = "safe-to-deploy" + +[[exemptions.crypto-common]] +version = "0.1.7" +criteria = "safe-to-deploy" + +[[exemptions.digest]] +version = "0.10.7" +criteria = "safe-to-deploy" + +[[exemptions.equivalent]] +version = "1.0.2" +criteria = "safe-to-deploy" + +[[exemptions.fallible-iterator]] +version = "0.2.0" +criteria = "safe-to-deploy" + +[[exemptions.find-msvc-tools]] +version = "0.1.5" +criteria = "safe-to-deploy" + +[[exemptions.fnv]] +version = "1.0.7" +criteria = "safe-to-deploy" + +[[exemptions.foldhash]] +version = "0.1.5" +criteria = "safe-to-deploy" + +[[exemptions.form_urlencoded]] +version = "1.2.2" +criteria = "safe-to-deploy" + +[[exemptions.futures]] +version = "0.3.31" +criteria = "safe-to-deploy" + +[[exemptions.futures-channel]] +version = "0.3.31" +criteria = "safe-to-deploy" + +[[exemptions.futures-core]] +version = "0.3.31" +criteria = "safe-to-deploy" + +[[exemptions.futures-executor]] +version = "0.3.31" +criteria = "safe-to-deploy" + +[[exemptions.futures-io]] +version = "0.3.31" +criteria = "safe-to-deploy" + +[[exemptions.futures-macro]] +version = "0.3.31" +criteria = "safe-to-deploy" + +[[exemptions.futures-sink]] +version = "0.3.31" +criteria = "safe-to-deploy" + +[[exemptions.futures-task]] +version = "0.3.31" +criteria = "safe-to-deploy" + +[[exemptions.futures-util]] +version = "0.3.31" +criteria = "safe-to-deploy" + +[[exemptions.generic-array]] +version = "0.14.7" +criteria = "safe-to-deploy" + +[[exemptions.getrandom]] +version = "0.3.4" +criteria = "safe-to-deploy" + +[[exemptions.hashbrown]] +version = "0.15.5" +criteria = "safe-to-deploy" + +[[exemptions.hashbrown]] +version = "0.16.0" +criteria = "safe-to-deploy" + +[[exemptions.heck]] +version = "0.5.0" +criteria = "safe-to-deploy" + +[[exemptions.hmac]] +version = "0.12.1" +criteria = "safe-to-deploy" + +[[exemptions.http]] +version = "1.3.1" +criteria = "safe-to-deploy" + +[[exemptions.iana-time-zone]] +version = "0.1.64" +criteria = "safe-to-deploy" + +[[exemptions.iana-time-zone-haiku]] +version = "0.1.2" +criteria = "safe-to-deploy" + +[[exemptions.id-arena]] +version = "2.2.1" +criteria = "safe-to-deploy" + +[[exemptions.indexmap]] +version = "2.12.0" +criteria = "safe-to-deploy" + +[[exemptions.itoa]] +version = "1.0.15" +criteria = "safe-to-deploy" + +[[exemptions.js-sys]] +version = "0.3.82" +criteria = "safe-to-deploy" + +[[exemptions.lazy_static]] +version = "1.5.0" +criteria = "safe-to-deploy" + +[[exemptions.leb128fmt]] +version = "0.1.0" +criteria = "safe-to-deploy" + +[[exemptions.libc]] +version = "0.2.177" +criteria = "safe-to-deploy" + +[[exemptions.log]] +version = "0.4.28" +criteria = "safe-to-deploy" + +[[exemptions.md-5]] +version = "0.10.6" +criteria = "safe-to-deploy" + +[[exemptions.memchr]] +version = "2.7.6" +criteria = "safe-to-deploy" + +[[exemptions.nu-ansi-term]] +version = "0.50.3" +criteria = "safe-to-deploy" + +[[exemptions.num-traits]] +version = "0.2.19" +criteria = "safe-to-deploy" + +[[exemptions.once_cell]] +version = "1.21.3" +criteria = "safe-to-deploy" + +[[exemptions.opentelemetry]] +version = "0.31.0" +criteria = "safe-to-deploy" + +[[exemptions.opentelemetry-appender-tracing]] +version = "0.31.1" +criteria = "safe-to-deploy" + +[[exemptions.opentelemetry_sdk]] +version = "0.31.0" +criteria = "safe-to-deploy" + +[[exemptions.percent-encoding]] +version = "2.3.2" +criteria = "safe-to-deploy" + +[[exemptions.pin-project-lite]] +version = "0.2.16" +criteria = "safe-to-deploy" + +[[exemptions.pin-utils]] +version = "0.1.0" +criteria = "safe-to-deploy" + +[[exemptions.postgres-protocol]] +version = "0.6.9" +criteria = "safe-to-deploy" + +[[exemptions.postgres-types]] +version = "0.2.11" +criteria = "safe-to-deploy" + +[[exemptions.postgres_range]] +version = "0.11.1" +criteria = "safe-to-deploy" + +[[exemptions.ppv-lite86]] +version = "0.2.21" +criteria = "safe-to-deploy" + +[[exemptions.prettyplease]] +version = "0.2.37" +criteria = "safe-to-deploy" + +[[exemptions.proc-macro2]] +version = "1.0.103" +criteria = "safe-to-deploy" + +[[exemptions.quote]] +version = "1.0.42" +criteria = "safe-to-deploy" + +[[exemptions.r-efi]] +version = "5.3.0" +criteria = "safe-to-deploy" + +[[exemptions.rand]] +version = "0.9.2" +criteria = "safe-to-deploy" + +[[exemptions.rand_chacha]] +version = "0.9.0" +criteria = "safe-to-deploy" + +[[exemptions.rand_core]] +version = "0.9.3" +criteria = "safe-to-deploy" + +[[exemptions.routefinder]] +version = "0.5.4" +criteria = "safe-to-deploy" + +[[exemptions.rust_decimal]] +version = "1.39.0" +criteria = "safe-to-deploy" + +[[exemptions.rustversion]] +version = "1.0.22" +criteria = "safe-to-deploy" + +[[exemptions.ryu]] +version = "1.0.20" +criteria = "safe-to-deploy" + +[[exemptions.semver]] +version = "1.0.27" +criteria = "safe-to-deploy" + +[[exemptions.serde]] +version = "1.0.228" +criteria = "safe-to-deploy" + +[[exemptions.serde_core]] +version = "1.0.228" +criteria = "safe-to-deploy" + +[[exemptions.serde_derive]] +version = "1.0.228" +criteria = "safe-to-deploy" + +[[exemptions.serde_json]] +version = "1.0.145" +criteria = "safe-to-deploy" + +[[exemptions.sha2]] +version = "0.10.9" +criteria = "safe-to-deploy" + +[[exemptions.sharded-slab]] +version = "0.1.7" +criteria = "safe-to-deploy" + +[[exemptions.shlex]] +version = "1.3.0" +criteria = "safe-to-deploy" + +[[exemptions.slab]] +version = "0.4.11" +criteria = "safe-to-deploy" + +[[exemptions.smallvec]] +version = "1.15.1" +criteria = "safe-to-deploy" + +[[exemptions.smartcow]] +version = "0.2.1" +criteria = "safe-to-deploy" + +[[exemptions.smartstring]] +version = "1.0.1" +criteria = "safe-to-deploy" + +[[exemptions.spin-executor]] +version = "5.1.1" +criteria = "safe-to-deploy" + +[[exemptions.spin-macro]] +version = "5.1.1" +criteria = "safe-to-deploy" + +[[exemptions.spin-sdk]] +version = "5.1.1" +criteria = "safe-to-deploy" + +[[exemptions.static_assertions]] +version = "1.1.0" +criteria = "safe-to-deploy" + +[[exemptions.stringprep]] +version = "0.1.5" +criteria = "safe-to-deploy" + +[[exemptions.subtle]] +version = "2.6.1" +criteria = "safe-to-deploy" + +[[exemptions.syn]] +version = "1.0.109" +criteria = "safe-to-deploy" + +[[exemptions.syn]] +version = "2.0.110" +criteria = "safe-to-deploy" + +[[exemptions.thiserror]] +version = "2.0.17" +criteria = "safe-to-deploy" + +[[exemptions.thiserror-impl]] +version = "2.0.17" +criteria = "safe-to-deploy" + +[[exemptions.thread_local]] +version = "1.1.9" +criteria = "safe-to-deploy" + +[[exemptions.tinyvec]] +version = "1.10.0" +criteria = "safe-to-deploy" + +[[exemptions.tinyvec_macros]] +version = "0.1.1" +criteria = "safe-to-deploy" + +[[exemptions.tracing]] +version = "0.1.41" +criteria = "safe-to-deploy" + +[[exemptions.tracing-attributes]] +version = "0.1.30" +criteria = "safe-to-deploy" + +[[exemptions.tracing-core]] +version = "0.1.34" +criteria = "safe-to-deploy" + +[[exemptions.tracing-log]] +version = "0.2.0" +criteria = "safe-to-deploy" + +[[exemptions.tracing-opentelemetry]] +version = "0.32.0" +criteria = "safe-to-deploy" + +[[exemptions.tracing-subscriber]] +version = "0.3.20" +criteria = "safe-to-deploy" + +[[exemptions.typenum]] +version = "1.19.0" +criteria = "safe-to-deploy" + +[[exemptions.unicode-bidi]] +version = "0.3.18" +criteria = "safe-to-deploy" + +[[exemptions.unicode-ident]] +version = "1.0.22" +criteria = "safe-to-deploy" + +[[exemptions.unicode-normalization]] +version = "0.1.25" +criteria = "safe-to-deploy" + +[[exemptions.unicode-properties]] +version = "0.1.4" +criteria = "safe-to-deploy" + +[[exemptions.unicode-xid]] +version = "0.2.6" +criteria = "safe-to-deploy" + +[[exemptions.uuid]] +version = "1.18.1" +criteria = "safe-to-deploy" + +[[exemptions.valuable]] +version = "0.1.1" +criteria = "safe-to-deploy" + +[[exemptions.version_check]] +version = "0.9.5" +criteria = "safe-to-deploy" + +[[exemptions.wasi]] +version = "0.13.1+wasi-0.2.0" +criteria = "safe-to-deploy" + +[[exemptions.wasip2]] +version = "1.0.1+wasi-0.2.4" +criteria = "safe-to-deploy" + +[[exemptions.wasm-bindgen]] +version = "0.2.105" +criteria = "safe-to-deploy" + +[[exemptions.wasm-bindgen-macro]] +version = "0.2.105" +criteria = "safe-to-deploy" + +[[exemptions.wasm-bindgen-macro-support]] +version = "0.2.105" +criteria = "safe-to-deploy" + +[[exemptions.wasm-bindgen-shared]] +version = "0.2.105" +criteria = "safe-to-deploy" + +[[exemptions.wasm-encoder]] +version = "0.235.0" +criteria = "safe-to-deploy" + +[[exemptions.wasm-encoder]] +version = "0.240.0" +criteria = "safe-to-deploy" + +[[exemptions.wasm-metadata]] +version = "0.235.0" +criteria = "safe-to-deploy" + +[[exemptions.wasm-metadata]] +version = "0.240.0" +criteria = "safe-to-deploy" + +[[exemptions.wasmparser]] +version = "0.235.0" +criteria = "safe-to-deploy" + +[[exemptions.wasmparser]] +version = "0.240.0" +criteria = "safe-to-deploy" + +[[exemptions.web-time]] +version = "1.1.0" +criteria = "safe-to-deploy" + +[[exemptions.windows-core]] +version = "0.62.2" +criteria = "safe-to-deploy" + +[[exemptions.windows-implement]] +version = "0.60.2" +criteria = "safe-to-deploy" + +[[exemptions.windows-interface]] +version = "0.59.3" +criteria = "safe-to-deploy" + +[[exemptions.windows-link]] +version = "0.2.1" +criteria = "safe-to-deploy" + +[[exemptions.windows-result]] +version = "0.4.1" +criteria = "safe-to-deploy" + +[[exemptions.windows-strings]] +version = "0.5.1" +criteria = "safe-to-deploy" + +[[exemptions.windows-sys]] +version = "0.61.2" +criteria = "safe-to-deploy" + +[[exemptions.wit-bindgen]] +version = "0.43.0" +criteria = "safe-to-deploy" + +[[exemptions.wit-bindgen]] +version = "0.46.0" +criteria = "safe-to-deploy" + +[[exemptions.wit-bindgen]] +version = "0.47.0" +criteria = "safe-to-deploy" + +[[exemptions.wit-bindgen-core]] +version = "0.43.0" +criteria = "safe-to-deploy" + +[[exemptions.wit-bindgen-core]] +version = "0.47.0" +criteria = "safe-to-deploy" + +[[exemptions.wit-bindgen-rt]] +version = "0.24.0" +criteria = "safe-to-deploy" + +[[exemptions.wit-bindgen-rt]] +version = "0.43.0" +criteria = "safe-to-deploy" + +[[exemptions.wit-bindgen-rust]] +version = "0.43.0" +criteria = "safe-to-deploy" + +[[exemptions.wit-bindgen-rust]] +version = "0.47.0" +criteria = "safe-to-deploy" + +[[exemptions.wit-bindgen-rust-macro]] +version = "0.43.0" +criteria = "safe-to-deploy" + +[[exemptions.wit-bindgen-rust-macro]] +version = "0.47.0" +criteria = "safe-to-deploy" + +[[exemptions.wit-component]] +version = "0.235.0" +criteria = "safe-to-deploy" + +[[exemptions.wit-component]] +version = "0.240.0" +criteria = "safe-to-deploy" + +[[exemptions.wit-parser]] +version = "0.235.0" +criteria = "safe-to-deploy" + +[[exemptions.wit-parser]] +version = "0.240.0" +criteria = "safe-to-deploy" + +[[exemptions.zerocopy]] +version = "0.8.27" +criteria = "safe-to-deploy" + +[[exemptions.zerocopy-derive]] +version = "0.8.27" +criteria = "safe-to-deploy" diff --git a/rust/supply-chain/imports.lock b/rust/supply-chain/imports.lock new file mode 100644 index 0000000..0c397a4 --- /dev/null +++ b/rust/supply-chain/imports.lock @@ -0,0 +1,2 @@ + +# cargo-vet imports lock diff --git a/ts/eslint.config.mjs b/ts/eslint.config.mjs index a3764ef..d18f531 100644 --- a/ts/eslint.config.mjs +++ b/ts/eslint.config.mjs @@ -8,11 +8,22 @@ export default [ ignores: ['**/dist/', '**/types/', '**/build/', 'jest.config.js'], }, eslint.configs.recommended, - ...tseslint.configs.recommended, + ...tseslint.configs.strictTypeChecked, + { + languageOptions: { + parserOptions: { + projectService: true, + tsconfigRootDir: import.meta.dirname, + }, + }, + }, + { + files: ['**/*.js', '**/*.mjs'], + ...tseslint.configs.disableTypeChecked, + }, eslintConfigPrettier, { rules: { - // Ignore variables and arguments prefixed with '_'. '@typescript-eslint/no-unused-vars': [ 'error', { diff --git a/ts/examples/spin-basic/src/index.ts b/ts/examples/spin-basic/src/index.ts index 18d8061..a22a10d 100644 --- a/ts/examples/spin-basic/src/index.ts +++ b/ts/examples/spin-basic/src/index.ts @@ -66,12 +66,12 @@ router.get('/', async () => { const logger = logs.getLogger('spin-logs'); logger.emit({ - severityNumber: SeverityNumber.INFO, - severityText: 'INFO', - body: 'Hello from TypeScript!', - attributes: attrs, - context: hostContext, // To have the log associated with the trace, we pass the host context - }); + severityNumber: SeverityNumber.INFO, + severityText: 'INFO', + body: 'Hello from TypeScript!', + attributes: attrs, + context: hostContext, // To have the log associated with the trace, we pass the host context + }); /* ### TRACING ### diff --git a/ts/package.json b/ts/package.json index 1affc3e..06044d8 100644 --- a/ts/package.json +++ b/ts/package.json @@ -2,8 +2,8 @@ "name": "@opentelemetry/wasi", "version": "0.1.0", "description": "Enables using OpenTelemetry within TypeScript WebAssembly components backed by WASI OTel.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", "directories": { "example": "examples" }, diff --git a/ts/src/logs.test.ts b/ts/src/logs.test.ts index 8a77a7f..72e6cc7 100644 --- a/ts/src/logs.test.ts +++ b/ts/src/logs.test.ts @@ -21,7 +21,7 @@ describe('logAnyValueToWasi', () => { const result: Record