@postxl/generator 1.0.9 → 1.0.11

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,4 +1,14 @@
1
1
  import { PackageName } from './branded.types';
2
+ /**
3
+ * Hardcoded pnpm version used across all generated projects.
4
+ * Update this when upgrading pnpm.
5
+ */
6
+ export declare const PNPM_VERSION = "10.27.0";
7
+ /**
8
+ * Hardcoded Node.js version used across all generated projects.
9
+ * Update this when upgrading Node.js.
10
+ */
11
+ export declare const NODE_VERSION = "24.12.0";
2
12
  export type PackageJsonConfig = {
3
13
  /**
4
14
  * Name of the package. Should contain `@postxl/` prefix.
@@ -30,10 +40,6 @@ export type PackageJsonConfig = {
30
40
  * Type of the package.
31
41
  */
32
42
  type?: 'module' | 'commonjs';
33
- /**
34
- * The package manager used in the project.
35
- */
36
- packageManager?: string;
37
43
  /**
38
44
  * Indicates whether the package is part of a PostXL workspace.
39
45
  *
@@ -54,4 +60,4 @@ export type PackageScript = {
54
60
  name: string;
55
61
  command: string;
56
62
  };
57
- export declare function generatePackageJson({ dependencies, devDependencies, scripts, name, description, type: pType, packageManager, isInPostXlWorkspace, }: PackageJsonConfig): string;
63
+ export declare function generatePackageJson({ dependencies, devDependencies, scripts, name, description, type: pType, isInPostXlWorkspace, }: PackageJsonConfig): string;
@@ -1,11 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NODE_VERSION = exports.PNPM_VERSION = void 0;
3
4
  exports.isPostXlWorkspacePackageName = isPostXlWorkspacePackageName;
4
5
  exports.generatePackageJson = generatePackageJson;
6
+ /**
7
+ * Hardcoded pnpm version used across all generated projects.
8
+ * Update this when upgrading pnpm.
9
+ */
10
+ exports.PNPM_VERSION = '10.27.0';
11
+ /**
12
+ * Hardcoded Node.js version used across all generated projects.
13
+ * Update this when upgrading Node.js.
14
+ */
15
+ exports.NODE_VERSION = '24.12.0';
5
16
  function isPostXlWorkspacePackageName(packageName) {
6
17
  return !('version' in packageName) && packageName.packageName.startsWith('@postxl/');
7
18
  }
8
- function generatePackageJson({ dependencies, devDependencies, scripts, name, description, type: pType, packageManager, isInPostXlWorkspace, }) {
19
+ function generatePackageJson({ dependencies, devDependencies, scripts, name, description, type: pType, isInPostXlWorkspace, }) {
9
20
  return JSON.stringify({
10
21
  name,
11
22
  version: '0.0.0',
@@ -16,7 +27,8 @@ function generatePackageJson({ dependencies, devDependencies, scripts, name, des
16
27
  scripts: scripts
17
28
  .toSorted((a, b) => a.name.localeCompare(b.name))
18
29
  .reduce((acc, script) => ({ ...acc, [script.name]: script.command }), {}),
19
- packageManager,
30
+ packageManager: `pnpm@${exports.PNPM_VERSION}`,
31
+ devEngines: { runtime: { name: 'node', version: exports.NODE_VERSION, onFail: 'download' } },
20
32
  dependencies: dependencies
21
33
  .map((dependency) => toDependency_Package({ dependency, isInPostXlWorkspace }))
22
34
  .toSorted((a, b) => a.packageName.localeCompare(b.packageName))
@@ -67,7 +67,6 @@ exports.textExtensions = [
67
67
  '.toml',
68
68
  '.xml',
69
69
  '.svg',
70
- '.nvmrc',
71
70
  '.npmignore',
72
71
  '.gitignore',
73
72
  '.sql',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@postxl/generator",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "Core package that orchestrates the code generation of a PXL project",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",