@faable/faable 1.26.0 → 1.27.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.
@@ -42,12 +42,16 @@ const deploy = {
42
42
  const config = Configuration.instance().deployConfig();
43
43
  const app_id = await resolve_app_id(args.app_id, ctx.appId, api, workdir);
44
44
  const app = await api.getApp(app_id);
45
- // Monorepo Root Directory: the server is the source of truth
46
- // (App.root_dir), so no repo config file is needed. A local
47
- // faable.json rootDir (dev override) still wins if set.
48
- if (!config.rootDir && app.root_dir) {
45
+ // Monorepo Root Directory single precedence rule everywhere
46
+ // (arch/deploy/root-dir-faable-json.md): App.root_dir (platform
47
+ // override, exceptional) > repo faable.json rootDir (the supported
48
+ // user option) > repo root. Matches the remote builder.
49
+ if (app.root_dir) {
49
50
  config.rootDir = app.root_dir;
50
- log.info(`📁 Monorepo root directory (from app): ${app.root_dir}`);
51
+ log.info(`📁 Root directory: ${app.root_dir} (platform override)`);
52
+ }
53
+ else if (config.rootDir) {
54
+ log.info(`📁 Root directory: ${config.rootDir} (from faable.json)`);
51
55
  }
52
56
  // Capture the commit/ref/actor so the deployment records which commit
53
57
  // it came from and who pushed it (env in CI, git fallback locally).
@@ -11,19 +11,15 @@ const gitRunner = (workdir) => command => new Promise(resolve => {
11
11
  resolve(out || undefined);
12
12
  });
13
13
  });
14
- // Loose version shape: "starts like semver". Filters out non-version tags
15
- // (e.g. "nightly", "deploy-2026-07-01") when falling back to git describe;
16
- // explicit values (--release / FAABLE_RELEASE) are NEVER validated — the
17
- // platform treats release as free text.
18
- const looksLikeVersion = (v) => /^\d+\.\d+\.\d+/.test(v);
19
- const stripV = (tag) => tag.replace(/^v/, "");
20
14
  /**
21
15
  * Propose the release version for a deploy (Sentry propose-version pattern):
22
16
  * explicit `--release` > `FAABLE_RELEASE` env > latest reachable git tag
23
- * (`v1.2.3` or `1.2.3`, e.g. the tag semantic-release created) > undefined.
24
- * When undefined the field is omitted from the deployment and the platform
25
- * injects no FAABLE_RELEASE the app falls back to its own version source.
26
- * No SHA fallback: the commit already travels as `github_commit`.
17
+ * (e.g. the tag semantic-release created) > undefined. The release is FREE
18
+ * TEXT and travels VERBATIM no `v` stripping, no shape validation; only
19
+ * the dashboard footer prepends a display `v`. When undefined the field is
20
+ * omitted from the deployment and the platform injects no FAABLE_RELEASE
21
+ * the app falls back to its own version source. No SHA fallback: the commit
22
+ * already travels as `github_commit`.
27
23
  */
28
24
  const propose_release = async (opts) => {
29
25
  const env = opts?.env ?? process.env;
@@ -32,20 +28,15 @@ const propose_release = async (opts) => {
32
28
  return { release: opts.explicit, source: "--release" };
33
29
  if (env.FAABLE_RELEASE)
34
30
  return { release: env.FAABLE_RELEASE, source: "FAABLE_RELEASE env" };
35
- // Latest tag reachable from HEAD. Try version-shaped tags first so a
36
- // repo that also tags non-releases still resolves; retry unfiltered for
37
- // repos whose release tags carry no `v` prefix.
31
+ // Latest tag reachable from HEAD, verbatim. Version-shaped tags are tried
32
+ // first so a repo that also tags non-releases still prefers its releases.
38
33
  for (const cmd of [
39
34
  `git describe --tags --abbrev=0 --match "v[0-9]*"`,
40
35
  `git describe --tags --abbrev=0`,
41
36
  ]) {
42
37
  const tag = await run(cmd);
43
- if (!tag)
44
- continue;
45
- const version = stripV(tag);
46
- if (looksLikeVersion(version)) {
47
- return { release: version, source: `git tag ${tag}` };
48
- }
38
+ if (tag)
39
+ return { release: tag, source: `git tag ${tag}` };
49
40
  }
50
41
  return undefined;
51
42
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faable/faable",
3
- "version": "1.26.0",
3
+ "version": "1.27.0",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "author": "Marc Pomar <marc@faable.com>",