Microblog

@tomfinley@wptoots.social Yeah WordPress itself is impressively backward compatible. Unfortunately PHP isn’t so much. I’ve been bit by breaking changes in PHP a number of times. Luckily, WordPress is actively developed and on top of things!

social.lol/@bw/111344605250778679

@lewiscowles1986@phpc.social YES. I was thinking about that after hearing about PocketBase, which is an executable for a SQLite-powered backend.

I think the problem is the huge dependency trees. Small changes in dependencies end up snowballing until you’re forced to upgrade packages. And at some point, upgrading packages requires updating your code, which may or may not be feasible depending on the changes that would need to happen.

social.lol/@bw/111341700142765522

How does Slack not have syntax highlighting on code blocks? It's supposed to be *the* chat application for work. Discord’s code blocks are way better.

(Someone correct me if Slack does have this feature and I'm just using it wrong. But including a language abbreviation after the opening code fence doesn't seem to do it.)

social.lol/@bw/111333489165075385

Continuing in my quest for nice Vue DX without build steps… I’ve learned two things:

- Even tho I’m using a downloaded ESM browser version, I can still install the Vue npm package and refer to its types from JSDoc.

- The composition API is much easier to type than the options API.

social.lol/@bw/111313172895016528

Vue devs, help!

Trying to get type support in regular JS using Vue’s ESM browser build.

Inside of the hasName computed value, VSCode thinks `this` refers to the `computed` object rather than the Vue app. What can I do here?

const test = createApp({
  data: () => ({
    name: 'Testing'
  }),

  computed: {
    hasName() {
      return !!this.name;
    }
  }
});

social.lol/@bw/111309530389909270

Another piece of nice-vue-but-no-build-step is using ES modules. That let’s me separate out components into their own files.

Still exploring type support, but adding a jsconfig.json with checkJs turned on is the first step. It kinda misinterprets things when using Vue’s options API, so it might be that the composition API is better for this use case.

social.lol/@bw/111308874619186766