@barefootjs/mojolicious 0.9.6 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  package BarefootJS::Backend::Mojo;
2
- our $VERSION = "0.9.5";
2
+ our $VERSION = "0.9.6";
3
3
  use Mojo::Base -base, -signatures;
4
4
 
5
5
  use Mojo::ByteStream qw(b);
@@ -1,5 +1,5 @@
1
1
  package Mojolicious::Plugin::BarefootJS::DevReload;
2
- our $VERSION = "0.9.5";
2
+ our $VERSION = "0.9.6";
3
3
  use Mojo::Base 'Mojolicious::Plugin', -signatures;
4
4
 
5
5
  =head1 NAME
@@ -1,5 +1,5 @@
1
1
  package Mojolicious::Plugin::BarefootJS;
2
- our $VERSION = "0.9.5";
2
+ our $VERSION = "0.9.6";
3
3
  use Mojo::Base 'Mojolicious::Plugin', -signatures;
4
4
 
5
5
  use Mojo::File qw(path);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barefootjs/mojolicious",
3
- "version": "0.9.6",
3
+ "version": "0.10.0",
4
4
  "description": "Mojolicious EP template adapter for BarefootJS - generates .html.ep files from IR",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -52,7 +52,7 @@
52
52
  "directory": "packages/adapter-mojolicious"
53
53
  },
54
54
  "dependencies": {
55
- "@barefootjs/shared": "0.9.6"
55
+ "@barefootjs/shared": "0.10.0"
56
56
  },
57
57
  "peerDependencies": {
58
58
  "@barefootjs/jsx": ">=0.2.0",
@@ -60,6 +60,6 @@
60
60
  },
61
61
  "devDependencies": {
62
62
  "@barefootjs/adapter-tests": "0.1.0",
63
- "@barefootjs/jsx": "0.9.6"
63
+ "@barefootjs/jsx": "0.10.0"
64
64
  }
65
65
  }
@@ -10,8 +10,8 @@
10
10
  // (Mojolicious's built-in dispatcher does not honour URL prefixes,
11
11
  // so the explicit routes are load-bearing — without them every
12
12
  // stylesheet and client bundle 404s in the browser).
13
- // - `lib/BarefootJS.pm` is vendored, `cpanfile` lists Mojolicious,
14
- // and `app.pl` uses `register_components_from_manifest` so the
13
+ // - the `cpanfile` declares the BarefootJS Perl deps + Mojolicious
14
+ // (installed from CPAN, not vendored under `lib/`), and the plugin's
15
15
  // manifest-driven child rendering works without per-component wire-up.
16
16
  //
17
17
  // BAREFOOT_CREATE_INTEGRATION=1 bun test src/__tests__/scaffold.test.ts
@@ -143,24 +143,24 @@ describe.skipIf(!INTEGRATION)(
143
143
  // -------------------------------------------------------------------------
144
144
 
145
145
  describe('mojo wiring', () => {
146
- test('lib/BarefootJS.pm is vendored', () => {
147
- expect(existsSync(path.join(projectDir, 'lib', 'BarefootJS.pm'))).toBe(true)
146
+ test('does not vendor BarefootJS .pm copies under lib/', () => {
147
+ // The Perl modules ship on CPAN now, so the scaffold pulls them
148
+ // via `cpanm --installdeps .` instead of vendoring copies. A
149
+ // stray lib/ would shadow the installed dist (app.pl no longer
150
+ // adds it to @INC anyway).
151
+ expect(existsSync(path.join(projectDir, 'lib', 'BarefootJS.pm'))).toBe(false)
148
152
  })
149
153
 
150
- test('lib/Mojolicious/Plugin/BarefootJS/DevReload.pm is vendored', () => {
151
- // The dev-reload plugin lives under a nested namespace so
152
- // `plugin 'BarefootJS::DevReload'` resolves to its file. A
153
- // missing vendor copy would crash app.pl at boot.
154
- expect(
155
- existsSync(
156
- path.join(projectDir, 'lib', 'Mojolicious', 'Plugin', 'BarefootJS', 'DevReload.pm'),
157
- ),
158
- ).toBe(true)
159
- })
160
-
161
- test('cpanfile lists Mojolicious', () => {
154
+ test('cpanfile declares the BarefootJS Perl deps + Mojolicious', () => {
155
+ // `Mojolicious::Plugin::BarefootJS` (the plugin + dev-reload
156
+ // plugin + BarefootJS::Backend::Mojo) and `BarefootJS` (core)
157
+ // are declared so `cpanm --installdeps .` installs everything
158
+ // `plugin 'BarefootJS'` / `plugin 'BarefootJS::DevReload'` need
159
+ // at boot.
162
160
  const cp = readFileSync(path.join(projectDir, 'cpanfile'), 'utf-8')
163
- expect(cp).toMatch(/Mojolicious/)
161
+ expect(cp).toMatch(/^requires 'BarefootJS'/m)
162
+ expect(cp).toMatch(/^requires 'Mojolicious::Plugin::BarefootJS'/m)
163
+ expect(cp).toMatch(/^requires 'Mojolicious'/m)
164
164
  })
165
165
 
166
166
  test('plugin auto-loads manifest — no per-route register_components_from_manifest call', () => {