Skip to content
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

Cleanup extensions dependencies #19922

Merged
merged 12 commits into from
Oct 5, 2023
Merged

Cleanup extensions dependencies #19922

merged 12 commits into from
Oct 5, 2023

Conversation

rijkvanzanten
Copy link
Member

Scope

What's changed:

  • Move all utils / types / constants related to extensions to a new @directus/extensions package
  • Allow reading all extensions on /extensions

Potential Risks / Drawbacks

  • This PR is moving code around without changing the actual functionality
  • People importing directly from @directus/utils / @directus/types / @directus/constants might have to import from @directus/extensions now. All types exported through @directus/extensions-sdk remain the same.

Review Questions

@changeset-bot
Copy link

changeset-bot bot commented Oct 5, 2023

🦋 Changeset detected

Latest commit: 65e1c5f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 19 packages
Name Type
@directus/extensions-sdk Patch
@directus/composables Patch
@directus/components Patch
@directus/extensions Patch
@directus/constants Patch
@directus/types Patch
@directus/utils Patch
@directus/api Patch
@directus/app Patch
create-directus-extension Patch
@directus/validation Patch
@directus/pressure Patch
@directus/storage-driver-azure Patch
@directus/storage-driver-cloudinary Patch
@directus/storage-driver-gcs Patch
@directus/storage-driver-local Patch
@directus/storage-driver-s3 Patch
@directus/storage-driver-supabase Patch
directus Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@rijkvanzanten
Copy link
Member Author

@paescuj @azrikahar, gonna take an educated risk on this and merge it. I'd still like a brief retrospective review if possible, but less of a priority 👍🏻

@rijkvanzanten rijkvanzanten merged commit 1383e85 into main Oct 5, 2023
7 checks passed
@rijkvanzanten rijkvanzanten deleted the cleanup branch October 5, 2023 23:20
@github-actions github-actions bot added this to the Next Patch Release milestone Oct 5, 2023
Copy link
Contributor

@azrikahar azrikahar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM in general! Just some tiny questions/todos from what I can observe.

I believe we'll need to add a license file as well 👍

};

export type BundleExtension = ExtensionBase & {
type: 'bundle';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understandably this isn't changed by this PR at all, but retroactively I wonder whether 'bundle' should be BundleExtensionType?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it should, I have some more cleaning up to do so I'll take it into account for that 👍🏻

"./node": "./dist/node/index.js",
"./package.json": "./package.json"
},
"main": "dist/index.js",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be misinterpreting this, but should it be dist/shared/index.js instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix ready at #19926 😄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we'll need to update this readme to describe @directus/extensions 👍

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops! Copy paste issue

rijkvanzanten pushed a commit that referenced this pull request Oct 6, 2023
* Adjust release types

* Update package.json file

* Adjust readme

* Align type def for BundleExtension

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>

* Add license

---------

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
br-rafaelbarros pushed a commit to personal-forks/directus-source that referenced this pull request Nov 7, 2023
* Setup boilerplate for extensions page

* Allow reading all extensions from the root endpoint

* Add basic sidebar info detail

* Render list of extensions

* Move extensions manager to folder

* Move stuff related to extensions to @directus/extensions

* Import extensions utils/types/etc from ext. package

* Resolve last imports

* Temp remove settings pane

Different PR!

* Add changeset

* Run formatter

* Fix import in test
br-rafaelbarros pushed a commit to personal-forks/directus-source that referenced this pull request Nov 7, 2023
* Adjust release types

* Update package.json file

* Adjust readme

* Align type def for BundleExtension

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>

* Add license

---------

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants