bun-workspaces 1.0.0-alpha.4 → 1.0.0-alpha.7

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.
Files changed (70) hide show
  1. package/README.md +4 -0
  2. package/bin/cli.js +0 -1
  3. package/package.json +5 -24
  4. package/src/cli/cli.d.ts +13 -0
  5. package/src/cli/cli.mjs +43 -0
  6. package/src/cli/globalOptions.d.ts +11 -0
  7. package/src/cli/globalOptions.mjs +65 -0
  8. package/src/cli/index.mjs +2 -0
  9. package/src/cli/projectCommands.d.ts +8 -0
  10. package/src/cli/projectCommands.mjs +179 -0
  11. package/src/config/bunWorkspacesConfig.d.ts +13 -0
  12. package/src/config/bunWorkspacesConfig.mjs +18 -0
  13. package/src/config/configFile.d.ts +3 -0
  14. package/src/config/configFile.mjs +21 -0
  15. package/src/config/index.d.ts +2 -0
  16. package/src/config/index.mjs +3 -0
  17. package/src/index.mjs +3 -0
  18. package/src/internal/bunVersion.d.ts +14 -0
  19. package/src/internal/bunVersion.mjs +8 -0
  20. package/src/internal/env.d.ts +5 -0
  21. package/src/internal/env.mjs +12 -0
  22. package/src/internal/error.d.ts +7 -0
  23. package/src/internal/error.mjs +26 -0
  24. package/src/internal/logger.d.ts +21 -0
  25. package/src/internal/logger.mjs +85 -0
  26. package/src/internal/regex.d.ts +2 -0
  27. package/src/internal/regex.mjs +3 -0
  28. package/src/project/errors.d.ts +1 -0
  29. package/src/project/errors.mjs +3 -0
  30. package/src/project/index.d.ts +1 -0
  31. package/src/project/index.mjs +2 -0
  32. package/src/project/project.d.ts +31 -0
  33. package/src/project/project.mjs +72 -0
  34. package/src/project/scriptCommand.d.ts +15 -0
  35. package/src/project/scriptCommand.mjs +18 -0
  36. package/src/workspaces/errors.d.ts +1 -0
  37. package/src/workspaces/errors.mjs +3 -0
  38. package/src/workspaces/findWorkspaces.d.ts +17 -0
  39. package/src/workspaces/findWorkspaces.mjs +66 -0
  40. package/src/workspaces/index.d.ts +3 -0
  41. package/src/workspaces/index.mjs +2 -0
  42. package/src/workspaces/packageJson.d.ts +8 -0
  43. package/src/workspaces/packageJson.mjs +65 -0
  44. package/src/workspaces/workspace.d.ts +13 -0
  45. package/src/workspaces/workspace.mjs +0 -0
  46. package/LICENSE.md +0 -21
  47. package/bun.lock +0 -573
  48. package/src/cli/cli.ts +0 -87
  49. package/src/cli/globalOptions.ts +0 -122
  50. package/src/cli/projectCommands.ts +0 -397
  51. package/src/config/bunWorkspacesConfig.ts +0 -62
  52. package/src/config/configFile.ts +0 -33
  53. package/src/config/index.ts +0 -7
  54. package/src/internal/bunVersion.ts +0 -26
  55. package/src/internal/env.ts +0 -25
  56. package/src/internal/error.ts +0 -38
  57. package/src/internal/logger.ts +0 -180
  58. package/src/internal/regex.ts +0 -5
  59. package/src/project/errors.ts +0 -6
  60. package/src/project/index.ts +0 -6
  61. package/src/project/project.ts +0 -155
  62. package/src/project/scriptCommand.ts +0 -40
  63. package/src/workspaces/errors.ts +0 -14
  64. package/src/workspaces/findWorkspaces.ts +0 -137
  65. package/src/workspaces/index.ts +0 -7
  66. package/src/workspaces/packageJson.ts +0 -166
  67. package/src/workspaces/workspace.ts +0 -14
  68. package/tsconfig.json +0 -28
  69. /package/src/cli/{index.ts → index.d.ts} +0 -0
  70. /package/src/{index.ts → index.d.ts} +0 -0
@@ -0,0 +1,2 @@
1
+ export declare const createRawPattern: (pattern: string) => string;
2
+ export declare const createWildcardRegex: (pattern: string) => RegExp;
@@ -0,0 +1,3 @@
1
+ const createRawPattern = (pattern)=>pattern.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2
+ const createWildcardRegex = (pattern)=>new RegExp(`^${pattern.split("*").map(createRawPattern).join(".*")}$`);
3
+ export { createRawPattern, createWildcardRegex };
@@ -0,0 +1 @@
1
+ export declare const ERRORS: import("../internal/error").DefinedErrors<"ProjectWorkspaceNotFound" | "WorkspaceScriptDoesNotExist">;
@@ -0,0 +1,3 @@
1
+ import { defineErrors } from "../internal/error.mjs";
2
+ const ERRORS = defineErrors("ProjectWorkspaceNotFound", "WorkspaceScriptDoesNotExist");
3
+ export { ERRORS };
@@ -0,0 +1 @@
1
+ export { type Project, type CreateProjectOptions, type CreateProjectScriptCommandOptions, createProject, } from "./project";
@@ -0,0 +1,2 @@
1
+ import { createProject } from "./project.mjs";
2
+ export { createProject };
@@ -0,0 +1,31 @@
1
+ import { type Workspace } from "../workspaces";
2
+ import { type CreateScriptCommandOptions, type ScriptCommand } from "./scriptCommand";
3
+ export interface ScriptMetadata {
4
+ name: string;
5
+ workspaces: Workspace[];
6
+ }
7
+ export type CreateProjectScriptCommandOptions = Omit<CreateScriptCommandOptions, "workspace" | "rootDir"> & {
8
+ workspaceName: string;
9
+ };
10
+ export interface CreateProjectScriptCommandResult {
11
+ command: ScriptCommand;
12
+ scriptName: string;
13
+ workspace: Workspace;
14
+ }
15
+ export interface Project {
16
+ name: string;
17
+ rootDir: string;
18
+ workspaces: Workspace[];
19
+ listWorkspacesWithScript(scriptName: string): Workspace[];
20
+ listScriptsWithWorkspaces(): Record<string, ScriptMetadata>;
21
+ findWorkspaceByName(workspaceName: string): Workspace | null;
22
+ findWorkspaceByAlias(alias: string): Workspace | null;
23
+ findWorkspaceByNameOrAlias(nameOrAlias: string): Workspace | null;
24
+ findWorkspacesByPattern(workspaceName: string): Workspace[];
25
+ createScriptCommand(options: CreateProjectScriptCommandOptions): CreateProjectScriptCommandResult;
26
+ }
27
+ export interface CreateProjectOptions {
28
+ rootDir: string;
29
+ workspaceAliases?: Record<string, string>;
30
+ }
31
+ export declare const createProject: (options: CreateProjectOptions) => Project;
@@ -0,0 +1,72 @@
1
+ import path from "path";
2
+ import { createWildcardRegex } from "../internal/regex.mjs";
3
+ import { findWorkspacesFromPackage } from "../workspaces/index.mjs";
4
+ import { ERRORS } from "./errors.mjs";
5
+ import { createScriptCommand } from "./scriptCommand.mjs";
6
+ class _Project {
7
+ options;
8
+ rootDir;
9
+ workspaceAliases;
10
+ workspaces;
11
+ name;
12
+ constructor(options){
13
+ this.options = options;
14
+ this.rootDir = options.rootDir;
15
+ this.workspaceAliases = options.workspaceAliases;
16
+ const { name, workspaces } = findWorkspacesFromPackage({
17
+ rootDir: options.rootDir,
18
+ workspaceAliases: options.workspaceAliases
19
+ });
20
+ this.name = name;
21
+ this.workspaces = workspaces;
22
+ }
23
+ listWorkspacesWithScript(scriptName) {
24
+ return this.workspaces.filter((workspace)=>workspace.packageJson.scripts?.[scriptName]);
25
+ }
26
+ listScriptsWithWorkspaces() {
27
+ const scripts = new Set();
28
+ this.workspaces.forEach((workspace)=>{
29
+ Object.keys(workspace.packageJson.scripts ?? {}).forEach((script)=>scripts.add(script));
30
+ });
31
+ return Array.from(scripts).sort((a, b)=>a.localeCompare(b)).map((name)=>({
32
+ name,
33
+ workspaces: this.listWorkspacesWithScript(name)
34
+ })).reduce((acc, { name, workspaces })=>({
35
+ ...acc,
36
+ [name]: {
37
+ name,
38
+ workspaces
39
+ }
40
+ }), {});
41
+ }
42
+ findWorkspaceByName(workspaceName) {
43
+ return this.workspaces.find((workspace)=>workspace.name === workspaceName) ?? null;
44
+ }
45
+ findWorkspaceByAlias(alias) {
46
+ return this.workspaces.find((workspace)=>workspace.aliases.includes(alias)) ?? null;
47
+ }
48
+ findWorkspaceByNameOrAlias(nameOrAlias) {
49
+ return this.findWorkspaceByName(nameOrAlias) || this.findWorkspaceByAlias(nameOrAlias);
50
+ }
51
+ findWorkspacesByPattern(workspacePattern) {
52
+ if (!workspacePattern) return [];
53
+ const regex = createWildcardRegex(workspacePattern);
54
+ return this.workspaces.filter((workspace)=>regex.test(workspace.name));
55
+ }
56
+ createScriptCommand(options) {
57
+ const workspace = this.findWorkspaceByNameOrAlias(options.workspaceName);
58
+ if (!workspace) throw new ERRORS.ProjectWorkspaceNotFound(`Workspace not found: ${JSON.stringify(options.workspaceName)}`);
59
+ if (!workspace.packageJson.scripts?.[options.scriptName]) throw new ERRORS.WorkspaceScriptDoesNotExist(`Script not found in workspace ${JSON.stringify(workspace.name)}: ${JSON.stringify(options.scriptName)} (available: ${Object.keys(workspace.packageJson.scripts).join(", ") || "none"}`);
60
+ return {
61
+ workspace,
62
+ scriptName: options.scriptName,
63
+ command: createScriptCommand({
64
+ ...options,
65
+ workspace,
66
+ rootDir: path.resolve(this.rootDir)
67
+ })
68
+ };
69
+ }
70
+ }
71
+ const createProject = (options)=>new _Project(options);
72
+ export { createProject };
@@ -0,0 +1,15 @@
1
+ import type { Workspace } from "../workspaces";
2
+ export declare const SCRIPT_COMMAND_METHODS: readonly ["cd", "filter"];
3
+ export type ScriptCommandMethod = (typeof SCRIPT_COMMAND_METHODS)[number];
4
+ export interface CreateScriptCommandOptions {
5
+ method: ScriptCommandMethod;
6
+ scriptName: string;
7
+ args: string;
8
+ workspace: Workspace;
9
+ rootDir: string;
10
+ }
11
+ export interface ScriptCommand {
12
+ command: string;
13
+ cwd: string;
14
+ }
15
+ export declare const createScriptCommand: (options: CreateScriptCommandOptions) => ScriptCommand;
@@ -0,0 +1,18 @@
1
+ import path from "path";
2
+ const SCRIPT_COMMAND_METHODS = [
3
+ "cd",
4
+ "filter"
5
+ ];
6
+ const spaceArgs = (args)=>args ? ` ${args.trim()}` : "";
7
+ const METHODS = {
8
+ cd: ({ scriptName, workspace, rootDir, args })=>({
9
+ cwd: path.resolve(rootDir, workspace.path),
10
+ command: `bun --silent run ${scriptName}${spaceArgs(args)}`
11
+ }),
12
+ filter: ({ scriptName, workspace, args, rootDir })=>({
13
+ cwd: rootDir,
14
+ command: `bun --silent run --filter=${JSON.stringify(workspace.name)} ${scriptName}${spaceArgs(args)}`
15
+ })
16
+ };
17
+ const createScriptCommand = (options)=>METHODS[options.method](options);
18
+ export { SCRIPT_COMMAND_METHODS, createScriptCommand };
@@ -0,0 +1 @@
1
+ export declare const ERRORS: import("../internal/error").DefinedErrors<"AliasConflict" | "AliasedWorkspaceNotFound" | "DuplicateWorkspaceName" | "InvalidPackageJson" | "InvalidScripts" | "InvalidWorkspaceName" | "InvalidWorkspacePattern" | "InvalidWorkspaces" | "NoWorkspaceName" | "PackageNotFound">;
@@ -0,0 +1,3 @@
1
+ import { defineErrors } from "../internal/error.mjs";
2
+ const ERRORS = defineErrors("PackageNotFound", "InvalidPackageJson", "DuplicateWorkspaceName", "InvalidWorkspaceName", "NoWorkspaceName", "InvalidScripts", "InvalidWorkspaces", "InvalidWorkspacePattern", "AliasConflict", "AliasedWorkspaceNotFound");
3
+ export { ERRORS };
@@ -0,0 +1,17 @@
1
+ import type { ProjectConfig } from "../config";
2
+ import type { Workspace } from "./workspace";
3
+ export interface FindWorkspacesOptions {
4
+ rootDir: string;
5
+ workspaceGlobs: string[];
6
+ workspaceAliases?: ProjectConfig["workspaceAliases"];
7
+ }
8
+ export declare const findWorkspaces: ({ rootDir, workspaceGlobs, workspaceAliases, }: FindWorkspacesOptions) => {
9
+ workspaces: Workspace[];
10
+ };
11
+ export declare const validateWorkspaceAliases: (workspaces: Workspace[], workspaceAliases: Record<string, string> | undefined) => void;
12
+ export declare const findWorkspacesFromPackage: ({ rootDir, workspaceAliases, }: ProjectConfig & {
13
+ rootDir: string;
14
+ }) => {
15
+ workspaces: Workspace[];
16
+ name: string;
17
+ };
@@ -0,0 +1,66 @@
1
+ import fs from "fs";
2
+ import path from "path";
3
+ import { logger } from "../internal/logger.mjs";
4
+ import { ERRORS } from "./errors.mjs";
5
+ import { resolvePackageJsonContent, resolvePackageJsonPath, scanWorkspaceGlob } from "./packageJson.mjs";
6
+ const validatePattern = (pattern)=>{
7
+ if (pattern.startsWith("!")) {
8
+ logger.warn(`Negation patterns are not supported by Bun workspaces: ${JSON.stringify(pattern)}`);
9
+ return false;
10
+ }
11
+ return true;
12
+ };
13
+ const validateWorkspace = (workspace, workspaces)=>{
14
+ if (workspaces.find((ws)=>ws.path === workspace.path)) return false;
15
+ if (workspaces.find((ws)=>ws.name === workspace.name)) throw new ERRORS.DuplicateWorkspaceName(`Duplicate workspace name found: ${JSON.stringify(workspace.name)}`);
16
+ return true;
17
+ };
18
+ const findWorkspaces = ({ rootDir, workspaceGlobs, workspaceAliases })=>{
19
+ rootDir = path.resolve(rootDir);
20
+ const workspaces = [];
21
+ for (const pattern of workspaceGlobs)if (validatePattern(pattern)) for (const item of scanWorkspaceGlob(pattern, rootDir)){
22
+ const packageJsonPath = resolvePackageJsonPath(item);
23
+ if (packageJsonPath) {
24
+ const packageJsonContent = resolvePackageJsonContent(packageJsonPath, rootDir, [
25
+ "name",
26
+ "scripts"
27
+ ]);
28
+ const workspace = {
29
+ name: packageJsonContent.name ?? "",
30
+ matchPattern: pattern,
31
+ path: path.relative(rootDir, path.dirname(packageJsonPath)),
32
+ packageJson: packageJsonContent,
33
+ aliases: Object.entries(workspaceAliases ?? {}).filter(([_, value])=>value === packageJsonContent.name).map(([key])=>key)
34
+ };
35
+ if (validateWorkspace(workspace, workspaces)) workspaces.push(workspace);
36
+ }
37
+ }
38
+ workspaces.sort((a, b)=>a.name.localeCompare(b.name) || a.path.localeCompare(b.path));
39
+ return {
40
+ workspaces
41
+ };
42
+ };
43
+ const validateWorkspaceAliases = (workspaces, workspaceAliases)=>{
44
+ for (const [alias, name] of Object.entries(workspaceAliases ?? {})){
45
+ if (workspaces.find((ws)=>ws.name === alias)) throw new ERRORS.AliasConflict(`Alias ${JSON.stringify(alias)} conflicts with workspace name ${JSON.stringify(name)}`);
46
+ if (!workspaces.find((ws)=>ws.name === name)) throw new ERRORS.AliasedWorkspaceNotFound(`Workspace ${JSON.stringify(name)} was aliased by ${JSON.stringify(alias)} but was not found`);
47
+ }
48
+ };
49
+ const findWorkspacesFromPackage = ({ rootDir, workspaceAliases })=>{
50
+ const packageJsonPath = path.join(rootDir, "package.json");
51
+ if (!fs.existsSync(packageJsonPath)) throw new ERRORS.PackageNotFound(`No package.json found at ${packageJsonPath}`);
52
+ const packageJson = resolvePackageJsonContent(packageJsonPath, rootDir, [
53
+ "workspaces"
54
+ ]);
55
+ const result = findWorkspaces({
56
+ rootDir,
57
+ workspaceGlobs: packageJson.workspaces ?? [],
58
+ workspaceAliases
59
+ });
60
+ validateWorkspaceAliases(result.workspaces, workspaceAliases);
61
+ return {
62
+ ...result,
63
+ name: packageJson.name ?? ""
64
+ };
65
+ };
66
+ export { findWorkspaces, findWorkspacesFromPackage, validateWorkspaceAliases };
@@ -0,0 +1,3 @@
1
+ export { findWorkspaces, findWorkspacesFromPackage, type FindWorkspacesOptions, } from "./findWorkspaces";
2
+ export { type Workspace } from "./workspace";
3
+ export type { ResolvedPackageJsonContent } from "./packageJson";
@@ -0,0 +1,2 @@
1
+ import { findWorkspaces, findWorkspacesFromPackage } from "./findWorkspaces.mjs";
2
+ export { findWorkspaces, findWorkspacesFromPackage };
@@ -0,0 +1,8 @@
1
+ export declare const resolvePackageJsonPath: (directoryItem: string) => string;
2
+ export type ResolvedPackageJsonContent = {
3
+ name: string;
4
+ workspaces: string[];
5
+ scripts: Record<string, string>;
6
+ } & Record<string, unknown>;
7
+ export declare const scanWorkspaceGlob: (pattern: string, rootDir: string) => Generator<string, void, void>;
8
+ export declare const resolvePackageJsonContent: (packageJsonPath: string, rootDir: string, validations: ("name" | "scripts" | "workspaces")[]) => ResolvedPackageJsonContent;
@@ -0,0 +1,65 @@
1
+ import fs from "fs";
2
+ import path from "path";
3
+ import { Glob } from "glob";
4
+ import { logger } from "../internal/logger.mjs";
5
+ import { ERRORS } from "./errors.mjs";
6
+ const resolvePackageJsonPath = (directoryItem)=>{
7
+ if ("package.json" === path.basename(directoryItem)) return directoryItem;
8
+ if (fs.existsSync(path.join(directoryItem, "package.json"))) return path.join(directoryItem, "package.json");
9
+ return "";
10
+ };
11
+ const scanWorkspaceGlob = (pattern, rootDir)=>new Glob(pattern, {
12
+ absolute: true,
13
+ cwd: rootDir
14
+ }).iterateSync();
15
+ const validateJsonRoot = (json)=>{
16
+ if (!json || "object" != typeof json || Array.isArray(json)) throw new ERRORS.InvalidPackageJson(`Expected package.json to be an object, got ${typeof json}`);
17
+ };
18
+ const validateName = (json)=>{
19
+ if ("string" != typeof json.name) throw new ERRORS.NoWorkspaceName(`Expected package.json to have a string "name" field${void 0 !== json.name ? ` (Received ${json.name})` : ""}`);
20
+ if (!json.name.trim()) throw new ERRORS.NoWorkspaceName('Expected package.json to have a non-empty "name" field');
21
+ if (json.name.includes("*")) throw new ERRORS.InvalidWorkspaceName(`Package name cannot contain the character '*' (workspace: "${json.name}")`);
22
+ return json.name;
23
+ };
24
+ const validateWorkspacePattern = (workspacePattern, rootDir)=>{
25
+ if ("string" != typeof workspacePattern) throw new ERRORS.InvalidWorkspacePattern(`Expected workspace pattern to be a string, got ${typeof workspacePattern}`);
26
+ if (!workspacePattern.trim()) return false;
27
+ const absolutePattern = path.resolve(rootDir, workspacePattern);
28
+ if (!absolutePattern.startsWith(rootDir)) throw new ERRORS.InvalidWorkspacePattern(`Cannot resolve workspace pattern outside of root directory ${rootDir}: ${absolutePattern}`);
29
+ return true;
30
+ };
31
+ const validateWorkspacePatterns = (json, rootDir)=>{
32
+ const workspaces = [];
33
+ if (json.workspaces) {
34
+ if (!Array.isArray(json.workspaces)) throw new ERRORS.InvalidWorkspaces('Expected package.json to have an array "workspaces" field');
35
+ for (const workspacePattern of json.workspaces)if (validateWorkspacePattern(workspacePattern, rootDir)) workspaces.push(workspacePattern);
36
+ }
37
+ return workspaces;
38
+ };
39
+ const validateScripts = (json)=>{
40
+ if (json.scripts && ("object" != typeof json.scripts || Array.isArray(json.scripts))) throw new ERRORS.InvalidScripts('Expected package.json to have an object "scripts" field');
41
+ if (json.scripts) {
42
+ for (const value of Object.values(json.scripts))if ("string" != typeof value) throw new ERRORS.InvalidScripts(`Expected workspace "${json.name}" script "${json.scripts}" to be a string, got ${typeof value}`);
43
+ }
44
+ return {
45
+ ...json.scripts
46
+ };
47
+ };
48
+ const resolvePackageJsonContent = (packageJsonPath, rootDir, validations)=>{
49
+ rootDir = path.resolve(rootDir);
50
+ let json = {};
51
+ try {
52
+ json = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
53
+ } catch (error) {
54
+ logger.error(error);
55
+ throw new ERRORS.InvalidPackageJson(`Failed to read and parse package.json at ${packageJsonPath}: ${error.message}`);
56
+ }
57
+ validateJsonRoot(json);
58
+ return {
59
+ ...json,
60
+ name: validations.includes("name") ? validateName(json) : json.name ?? "",
61
+ workspaces: validations.includes("workspaces") ? validateWorkspacePatterns(json, rootDir) : json?.workspaces ?? [],
62
+ scripts: validations.includes("scripts") ? validateScripts(json) : json.scripts ?? {}
63
+ };
64
+ };
65
+ export { resolvePackageJsonContent, resolvePackageJsonPath, scanWorkspaceGlob };
@@ -0,0 +1,13 @@
1
+ import type { ResolvedPackageJsonContent } from "./packageJson";
2
+ export interface Workspace {
3
+ /** The name of the workspace from its `package.json` */
4
+ name: string;
5
+ /** The relative path to the workspace from the root `package.json` */
6
+ path: string;
7
+ /** The pattern from `"workspaces"` in the root `package.json`that this workspace was matched from*/
8
+ matchPattern: string;
9
+ /** The contents of the workspace's package.json, with `"workspaces"` and `"scripts"` resolved */
10
+ packageJson: ResolvedPackageJsonContent;
11
+ /** Aliases assigned to the workspace via the `"workspaceAliases"` field in the config */
12
+ aliases: string[];
13
+ }
File without changes
package/LICENSE.md DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 Scott Morse
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.