Skip to content

Commit

Permalink
fix: add as-bs to peer dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
JairusSW committed Jan 21, 2025
1 parent b109240 commit bff0f30
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- fix: disable SIMD in generated transform code by default
- fix: re-add as-bs dependency so that it will not break in non-local environments
- fix: remove AS201 'conversion from type usize to i32' warning
- fix: add as-bs to peer depenencies so only one version is installed

## 2025-01-20 - 1.0.0-alpha.1

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
"typescript": "latest",
"visitor-as": "^0.11.4"
},
"peerDependencies": {
"as-bs": "latest"
},
"bugs": {
"url": "https://github.com/JairusSW/as-json/issues"
},
Expand Down Expand Up @@ -67,8 +70,5 @@
"prettier": "prettier -w ."
},
"type": "module",
"types": "assembly/index.ts",
"dependencies": {
"as-bs": "^1.0.1"
}
"types": "assembly/index.ts"
}
2 changes: 1 addition & 1 deletion transform/lib/index.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion transform/package.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"main": "./lib/index.js"
"main": "./lib/index.js",
"type": "module"
}
6 changes: 0 additions & 6 deletions transform/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,6 @@ class JSONTransform extends Visitor {
super.visitSource(node);
}
addRequiredImports(node: ClassDeclaration): void {
// if (!this.imports.find((i) => i.declarations.find((d) => d.foreignName.text == "bs"))) {
// if (!this.bsImport) {
// this.bsImport = 'import { bs } from "as-bs"';
// if (process.env["JSON_DEBUG"]) console.log("Added as-bs import: " + this.bsImport + "\n");
// }
// }
if (!this.imports.find((i) => i.declarations.find((d) => d.foreignName.text == "bs"))) {
if (!this.bsImport) {
this.bsImport = "import { bs } from \"as-bs\"";
Expand Down

0 comments on commit bff0f30

Please sign in to comment.