tidev / pulsar-titanium

Titanium SDK development tools and UI package for the Pulsar text editor
Other
36 stars 12 forks source link

fix: handle migrated config settings #666

Closed ewanharris closed 1 year ago

ewanharris commented 1 year ago

Previously this package was appcelerator-titanium, during a botched release before atom shutdown I renamed it to titanium to try and publish a new module (the backend was giving strange errors) that indicated updates couldn't be published. I should have followed this through with correcting the lookups for config settings and other things, so this is finally doing that.

It attempts to do it in a backwards compatible manner, first we lookup the new config setting, and then fallback to the older setting if we can't find it. However, I'm not certain what the behaviour will be for default values as these will be set in both places

Fixes #663

m1ga commented 1 year ago

Thanks for the quick update :+1:

Having a closer look tomorrow. Couldn't get it to run at the moment

Uncaught (in promise) TypeError: _utils.default.get is not a function
    at Toolbar.buildCommand (/home/miga/.pulsar/packages/appcelerator-titanium/lib/ui/toolbar.jsx:29)

in

const buildCommand = Utils.get(`appcelerator-titanium.general.${this.normalizedAppName}.buildCommand`);
ewanharris commented 1 year ago

Sigh, I renamed the function from .get but didn't rename the usage. Fixing! (and seeing if I can add a test that covers that)

m1ga commented 1 year ago

working fine now. One thing I saw in the devtool console: it's trying to read the map files out of the old appcelerator-titanium folder: Screenshot_20230223_094145 doesn't break anything but I wonder why this is the case

ewanharris commented 1 year ago

I think the filepath might be down to the package on the registry still being appcelerator-titanium so that is what the install location is, not sure on the invalid source maps though, that's produced by build tooling so could be anything.

I think once we publish a new version/rename the repo then it should then be just titanium on the registry

ewanharris commented 1 year ago

@m1ga Has this been working ok for you?

m1ga commented 1 year ago

yes, using it for some days now and didn't have any issue so far

ewanharris commented 1 year ago

Awesome, I'll go ahead and get it merged!