-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trivial: ByteArray thoughts #156
Labels
question
Further information is requested
Comments
lauckhart
added a commit
to lauckhart/matter.js
that referenced
this issue
Sep 3, 2024
This is a partial pass deconstructing the matter.js package. I tried to stick to decisions we'd previously agreed to. The new @project-chip/matter.js-general package contains those portions of matter.js that are not Matter specific. The new @project-chip/matter.js-model package contains the Matter object model. Since I was moving stuff around I got rid of the Uint8Array monkey patches we did in ByteArray. For the most part this just consisted of replacing the "ByteArray" type with "Uint8Array". The methods we injected I moved to a "Bytes" namespace containing utility functions. This is a breaking change. Following new conventions, the new packages don't have "matter.js" in their names, so they're just in "packages/general" and "packages/model". I also renamed packages/matter.js-tools to packages/tools. I did not rename the other directories yet. I updated codegen and the intermediate model package dependencies, so codegen errors do not prevent codegen from running except for the generated model files in @project-chip/matter.js-model. The new packages are smaller so I moved to a flat namespace for exports. So there are no subpaths exported from the "general" package, even though most of the exports were previously exported as subpaths of matter.js. I think this improves readability and makes consumption simpler. "model" also has a flat namespace but this was true of the previous "@project-chip/matter.js/model" module so this isn't as big of a change. I did my best to add exports to matter.js to support backward compatibility. However I used a little editorial control to select which exports to reproduce at the old location... I made sure to cover all of those we used previously in the examples. Many of the other exports were probably not ever used externally. Shouldn't be a big deal if I got it wrong; we can add additional exports or just inform users of the new locations. Fixes project-chip#156
lauckhart
added a commit
to lauckhart/matter.js
that referenced
this issue
Sep 3, 2024
This is a partial pass deconstructing the matter.js package. I tried to stick to decisions we'd previously agreed to. The new @project-chip/matter.js-general package contains those portions of matter.js that are not Matter specific. The new @project-chip/matter.js-model package contains the Matter object model. Since I was moving stuff around I got rid of the Uint8Array monkey patches we did in ByteArray. For the most part this just consisted of replacing the "ByteArray" type with "Uint8Array". The methods we injected I moved to a "Bytes" namespace containing utility functions. This is a breaking change. Following new conventions, the new packages don't have "matter.js" in their names, so they're just in "packages/general" and "packages/model". I also renamed packages/matter.js-tools to packages/tools. I did not rename the other directories yet. I updated codegen and the intermediate model package dependencies, so codegen errors do not prevent codegen from running except for the generated model files in @project-chip/matter.js-model. The new packages are smaller so I moved to a flat namespace for exports. So there are no subpaths exported from the "general" package, even though most of the exports were previously exported as subpaths of matter.js. I think this improves readability and makes consumption simpler. "model" also has a flat namespace but this was true of the previous "@project-chip/matter.js/model" module so this isn't as big of a change. I did my best to add exports to matter.js to support backward compatibility. However I used a little editorial control to select which exports to reproduce at the old location... I made sure to cover all of those we used previously in the examples. Many of the other exports were probably not ever used externally. Shouldn't be a big deal if I got it wrong; we can add additional exports or just inform users of the new locations. Fixes project-chip#156
lauckhart
added a commit
to lauckhart/matter.js
that referenced
this issue
Sep 3, 2024
This is a partial pass deconstructing the matter.js package. I tried to stick to decisions we'd previously agreed to. The new @project-chip/matter.js-general package contains those portions of matter.js that are not Matter specific. The new @project-chip/matter.js-model package contains the Matter object model. Since I was moving stuff around I got rid of the Uint8Array monkey patches we did in ByteArray. For the most part this just consisted of replacing the "ByteArray" type with "Uint8Array". The methods we injected I moved to a "Bytes" namespace containing utility functions. This is a breaking change. Following new conventions, the new packages don't have "matter.js" in their names, so they're just in "packages/general" and "packages/model". I also renamed packages/matter.js-tools to packages/tools. I did not rename the other directories yet. I updated codegen and the intermediate model package dependencies, so codegen errors do not prevent codegen from running except for the generated model files in @project-chip/matter.js-model. The new packages are smaller so I moved to a flat namespace for exports. So there are no subpaths exported from the "general" package, even though most of the exports were previously exported as subpaths of matter.js. I think this improves readability and makes consumption simpler. "model" also has a flat namespace but this was true of the previous "@project-chip/matter.js/model" module so this isn't as big of a change. I did my best to add exports to matter.js to support backward compatibility. However I used a little editorial control to select which exports to reproduce at the old location... I made sure to cover all of those we used previously in the examples. Many of the other exports were probably not ever used externally. Shouldn't be a big deal if I got it wrong; we can add additional exports or just inform users of the new locations. Fixes project-chip#156
lauckhart
added a commit
to lauckhart/matter.js
that referenced
this issue
Sep 3, 2024
This is a partial pass deconstructing the matter.js package. I tried to stick to decisions we'd previously agreed to. The new @project-chip/matter.js-general package contains those portions of matter.js that are not Matter specific. The new @project-chip/matter.js-model package contains the Matter object model. Since I was moving stuff around I got rid of the Uint8Array monkey patches we did in ByteArray. For the most part this just consisted of replacing the "ByteArray" type with "Uint8Array". The methods we injected I moved to a "Bytes" namespace containing utility functions. This is a breaking change. Following new conventions, the new packages don't have "matter.js" in their names, so they're just in "packages/general" and "packages/model". I also renamed packages/matter.js-tools to packages/tools. I did not rename the other directories yet. I updated codegen and the intermediate model package dependencies, so codegen errors do not prevent codegen from running except for the generated model files in @project-chip/matter.js-model. The new packages are smaller so I moved to a flat namespace for exports. So there are no subpaths exported from the "general" package, even though most of the exports were previously exported as subpaths of matter.js. I think this improves readability and makes consumption simpler. "model" also has a flat namespace but this was true of the previous "@project-chip/matter.js/model" module so this isn't as big of a change. I did my best to add exports to matter.js to support backward compatibility. However I used a little editorial control to select which exports to reproduce at the old location... I made sure to cover all of those we used previously in the examples. Many of the other exports were probably not ever used externally. Shouldn't be a big deal if I got it wrong; we can add additional exports or just inform users of the new locations. Fixes project-chip#156
lauckhart
added a commit
to lauckhart/matter.js
that referenced
this issue
Sep 9, 2024
This is a partial pass deconstructing the matter.js package. I tried to stick to decisions we'd previously agreed to. The new @project-chip/matter.js-general package contains those portions of matter.js that are not Matter specific. The new @project-chip/matter.js-model package contains the Matter object model. Since I was moving stuff around I got rid of the Uint8Array monkey patches we did in ByteArray. For the most part this just consisted of replacing the "ByteArray" type with "Uint8Array". The methods we injected I moved to a "Bytes" namespace containing utility functions. This is a breaking change. Following new conventions, the new packages don't have "matter.js" in their names, so they're just in "packages/general" and "packages/model". I also renamed packages/matter.js-tools to packages/tools. I did not rename the other directories yet. I updated codegen and the intermediate model package dependencies, so codegen errors do not prevent codegen from running except for the generated model files in @project-chip/matter.js-model. The new packages are smaller so I moved to a flat namespace for exports. So there are no subpaths exported from the "general" package, even though most of the exports were previously exported as subpaths of matter.js. I think this improves readability and makes consumption simpler. "model" also has a flat namespace but this was true of the previous "@project-chip/matter.js/model" module so this isn't as big of a change. I did my best to add exports to matter.js to support backward compatibility. However I used a little editorial control to select which exports to reproduce at the old location... I made sure to cover all of those we used previously in the examples. Many of the other exports were probably not ever used externally. Shouldn't be a big deal if I got it wrong; we can add additional exports or just inform users of the new locations. Fixes project-chip#156
lauckhart
added a commit
to lauckhart/matter.js
that referenced
this issue
Sep 9, 2024
This is a partial pass deconstructing the matter.js package. I tried to stick to decisions we'd previously agreed to. The new @project-chip/matter.js-general package contains those portions of matter.js that are not Matter specific. The new @project-chip/matter.js-model package contains the Matter object model. Since I was moving stuff around I got rid of the Uint8Array monkey patches we did in ByteArray. For the most part this just consisted of replacing the "ByteArray" type with "Uint8Array". The methods we injected I moved to a "Bytes" namespace containing utility functions. This is a breaking change. Following new conventions, the new packages don't have "matter.js" in their names, so they're just in "packages/general" and "packages/model". I also renamed packages/matter.js-tools to packages/tools. I did not rename the other directories yet. I updated codegen and the intermediate model package dependencies, so codegen errors do not prevent codegen from running except for the generated model files in @project-chip/matter.js-model. The new packages are smaller so I moved to a flat namespace for exports. So there are no subpaths exported from the "general" package, even though most of the exports were previously exported as subpaths of matter.js. I think this improves readability and makes consumption simpler. "model" also has a flat namespace but this was true of the previous "@project-chip/matter.js/model" module so this isn't as big of a change. I did my best to add exports to matter.js to support backward compatibility. However I used a little editorial control to select which exports to reproduce at the old location... I made sure to cover all of those we used previously in the examples. Many of the other exports were probably not ever used externally. Shouldn't be a big deal if I got it wrong; we can add additional exports or just inform users of the new locations. Fixes project-chip#156
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some quick ideas r.e. ByteArray.
The text was updated successfully, but these errors were encountered: