@flamework-experimental/networking 2.0.0-alpha.2 → 2.0.0-alpha.3

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.
package/README.md CHANGED
@@ -1,15 +1,17 @@
1
1
  # Flamework
2
2
 
3
- Flamework is an extensible framework for roblox-ts designed around portable, isolated and testable modules.
3
+ Flamework is an extensible framework for roblox-ts. It is built around modules that are portable,
4
+ isolated and easy to test.
4
5
 
5
6
  ## Documentation
6
7
 
7
- **[docs/](docs/README.md)** -- start there. A ten-part guide that builds up from a working entry
8
- point to plugins and project layout, plus reference material:
8
+ Start with **[docs/](docs/README.md)**. It holds a twelve-part guide, which starts from a working
9
+ entry point and builds up to plugins, project layout, scopes and testing. It also holds reference
10
+ material:
9
11
 
10
12
  | | |
11
13
  |---|---|
12
- | [Guide](docs/README.md#guide) | Getting started, modules, providers, lifecycle events, components, networking, macros, plugins, project structure, migrating from v1. |
14
+ | [Guide](docs/README.md#guide) | Getting started, modules, providers, lifecycle events, components, networking, macros, plugins, project structure, migrating from v1, scopes, testing in the place. |
13
15
  | [Internals](docs/reference/internals.md) | What the transformer does to your code and what the runtime does with the result. |
14
16
  | [Transformer plugins](docs/reference/transformer-plugins.md) | Adding macro types of your own. |
15
17
 
@@ -37,36 +39,36 @@ bun run test:place # the in-place suite in Roblox Studio (tests/place); need
37
39
  | `packages/core` | Modules, dependency injection, plugins and lifecycle events |
38
40
  | `packages/components` | CollectionService components, built on the core plugin system |
39
41
  | `packages/networking` | Remote events and functions |
40
- | `packages/testing` | In-place tests: sections, cleanup, a bindable and a remote to run them, a cloud entry; and `flamework-test`, the CLI that runs them in Roblox Studio on this machine or through Open Cloud (`cli/`) |
42
+ | `packages/testing` | Tests that run inside a place: sections, cleanup, a bindable and a remote that run them, and a cloud entry point. Also `flamework-test` (`cli/`), the CLI that runs them in Roblox Studio on this machine or through Open Cloud |
41
43
  | `packages/transformer` | The roblox-ts transformer |
42
44
  | `packages/transformer-plugin` | Public API for writing transformer plugins |
43
- | `packages/specs` | Runtime specs, compiled by `rbxtsc` and executed under Lune |
45
+ | `packages/specs` | Runtime specs, built by `rbxtsc` and run under Lune |
44
46
 
45
47
  ### Tests
46
48
 
47
- Two suites, both run by `bun run test`:
48
-
49
- - **Transformer tests** (`bun run test:unit`) compile a fixture project with the real `rbxtsc` and
50
- assert on the emitted Luau — guard generation, identifiers, nested macros and the plugin system.
51
- - **Runtime specs** (`bun run test:runtime`) execute compiled `@flamework-experimental/core`, `components` and
52
- `networking` under Lune using the harness in [`tests/runtime`](tests/runtime), which models
53
- roblox-ts's `TS.import` tree over the filesystem and stubs the Roblox API surface Flamework
54
- touches (Instances, attributes, CollectionService, RemoteEvents, Players, signals, `task`,
55
- `Enum`, and a `Heartbeat` pump so `Promise.delay` -- and therefore request timeouts -- runs).
56
- They cover dependency injection, modules, hooks and the per-frame lifecycle events, component
57
- construction, dependencies and streaming, and both halves of networking: events, functions,
58
- middleware and the generated guards.
59
-
60
- They run twice, once as `Server` and once as `Client`, because realm-dependent code paths --
61
- `@Provider`'s metadata, component streaming, and the client/server halves of networking -- differ
62
- between them. Where a spec asserts something realm-specific, running it from both sides is what
63
- proves the two agree: a function receives on `$name` and sends on `@name` from the server and the
64
- mirror image from the client, so the pair of runs pins the wire format down from both ends.
65
-
66
- Specs live in [`packages/specs`](packages/specs) and are compiled by `rbxtsc` like any other
67
- Flamework consumer, so they exercise the transformer and the runtime together.
68
-
69
- A third suite runs against the real engine and is left out of `bun run test`: the
70
- [test place](tests/place/README.md), a small game linked to the packages' builds, whose
71
- `@flamework-experimental/testing` sections `bun run test:place` runs in Roblox Studio, both realms,
72
- under four Rojo projects (see [Testing in Roblox Studio](docs/testing/studio.md)).
49
+ `bun run test` runs two suites:
50
+
51
+ - **Transformer tests** (`bun run test:unit`) build a fixture project with the real `rbxtsc` and
52
+ check the Luau it emits: guard generation, identifiers, nested macros and the plugin system.
53
+ - **Runtime specs** (`bun run test:runtime`) run the built `@flamework-experimental/core`,
54
+ `components` and `networking` packages under Lune. The harness in [`tests/runtime`](tests/runtime)
55
+ models roblox-ts's `TS.import` tree over the filesystem. It also stubs the parts of the Roblox API
56
+ that Flamework uses: Instances, attributes, CollectionService, RemoteEvents, Players, signals,
57
+ `task`, `Enum`, and a `Heartbeat` pump so that `Promise.delay` runs (and with it, request
58
+ timeouts). The specs cover dependency injection, modules, hooks and the per-frame lifecycle
59
+ events; component construction, dependencies and streaming; and both halves of networking:
60
+ events, functions, middleware and the generated guards.
61
+
62
+ The specs run twice, once as `Server` and once as `Client`, because some code paths depend on the
63
+ realm: `@Provider`'s metadata, component streaming, and the client and server halves of
64
+ networking. Running a realm-specific spec from both sides proves that the two sides agree. For
65
+ example, from the server a function receives on `$name` and sends on `@name`, and from the client
66
+ it does the reverse, so the two runs pin down the wire format from both ends.
67
+
68
+ Specs live in [`packages/specs`](packages/specs). `rbxtsc` builds them like any other project that
69
+ uses Flamework, so they test the transformer and the runtime together.
70
+
71
+ A third suite runs against the real engine, and `bun run test` leaves it out. It lives in the
72
+ [test place](tests/place/README.md), a small game linked to the packages' builds.
73
+ `bun run test:place` runs its `@flamework-experimental/testing` sections in Roblox Studio, on both
74
+ realms, under four Rojo projects (see [Testing in Roblox Studio](docs/testing/studio.md)).
package/flamework.build CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 1,
3
- "flameworkVersion": "2.0.0-alpha.3",
3
+ "flameworkVersion": "2.0.0-alpha.4",
4
4
  "identifiers": {},
5
5
  "idGenerationMode": "full",
6
6
  "identifierPrefix": "$n"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flamework-experimental/networking",
3
- "version": "2.0.0-alpha.2",
3
+ "version": "2.0.0-alpha.3",
4
4
  "main": "out/init.luau",
5
5
  "types": "out/index.d.ts",
6
6
  "scripts": {
@@ -15,7 +15,7 @@
15
15
  "access": "public"
16
16
  },
17
17
  "peerDependencies": {
18
- "@flamework-experimental/core": "*"
18
+ "@flamework-experimental/core": "^2.0.0-alpha.0"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@flamework-experimental/core": "2.0.0-alpha.2",