@sveltejs/kit 1.23.0 → 1.23.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltejs/kit",
3
- "version": "1.23.0",
3
+ "version": "1.23.1",
4
4
  "description": "The fastest way to build Svelte apps",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,6 +22,7 @@
22
22
  "sade": "^1.8.1",
23
23
  "set-cookie-parser": "^2.6.0",
24
24
  "sirv": "^2.0.2",
25
+ "tiny-glob": "^0.2.9",
25
26
  "undici": "~5.23.0"
26
27
  },
27
28
  "devDependencies": {
@@ -31,7 +32,7 @@
31
32
  "@types/node": "^16.18.6",
32
33
  "@types/sade": "^1.7.4",
33
34
  "@types/set-cookie-parser": "^2.4.2",
34
- "dts-buddy": "^0.1.9",
35
+ "dts-buddy": "^0.2.4",
35
36
  "marked": "^7.0.0",
36
37
  "rollup": "^3.7.0",
37
38
  "svelte": "^4.0.5",
package/postinstall.js CHANGED
@@ -1,8 +1,7 @@
1
- import fs from 'node:fs';
2
- import path from 'node:path';
3
1
  import { load_config } from './src/core/config/index.js';
4
- import { list_files } from './src/core/utils.js';
5
2
  import * as sync from './src/core/sync/sync.js';
3
+ import glob from 'tiny-glob/sync.js';
4
+ import fs from 'node:fs';
6
5
 
7
6
  try {
8
7
  const cwd = process.env.INIT_CWD ?? process.cwd();
@@ -11,20 +10,26 @@ try {
11
10
  if (fs.existsSync('package.json')) {
12
11
  const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
13
12
 
14
- const directories = [];
13
+ const workspaces = [];
15
14
 
16
15
  if (pkg.workspaces) {
17
- // we have to do this because of https://classic.yarnpkg.com/blog/2018/02/15/nohoist/
18
- const packages = Array.isArray(pkg.workspaces) ? pkg.workspaces : pkg.workspaces.packages;
19
-
20
- for (const directory of packages) {
21
- directories.push(...list_files(directory).map((dir) => path.resolve(cwd, dir)));
16
+ // Find all npm and Yarn workspace glob patterns
17
+ // https://classic.yarnpkg.com/blog/2018/02/15/nohoist/
18
+ // https://docs.npmjs.com/cli/v9/configuring-npm/package-json#workspaces
19
+ const patterns = Array.isArray(pkg.workspaces) ? pkg.workspaces : pkg.workspaces.packages;
20
+
21
+ for (const pattern of patterns) {
22
+ workspaces.push(
23
+ ...glob(pattern, { cwd, absolute: true }).filter((path) =>
24
+ fs.statSync(path).isDirectory()
25
+ )
26
+ );
22
27
  }
23
28
  } else {
24
- directories.push(cwd);
29
+ workspaces.push(cwd);
25
30
  }
26
31
 
27
- for (const cwd of directories) {
32
+ for (const cwd of workspaces) {
28
33
  process.chdir(cwd);
29
34
 
30
35
  if (!fs.existsSync('package.json')) continue;
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // generated during release, do not modify
2
2
 
3
3
  /** @type {string} */
4
- export const VERSION = '1.23.0';
4
+ export const VERSION = '1.23.1';