From 866ef412fc1dbc06f60d31d52ed3b2850627aa0c Mon Sep 17 00:00:00 2001 From: Chris Speciale Date: Sat, 31 Aug 2024 09:55:32 -0400 Subject: [PATCH 01/11] Data: Support more license types Adds support for the Mozilla Public license 2.0 and "Others" --- src/legacyhaxelib/Data.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/legacyhaxelib/Data.hx b/src/legacyhaxelib/Data.hx index e15a567bd..cd4d7f77d 100644 --- a/src/legacyhaxelib/Data.hx +++ b/src/legacyhaxelib/Data.hx @@ -67,7 +67,7 @@ class Data { public static var DOCXML = "haxedoc.xml"; public static var REPOSITORY = "files"; public static var alphanum = ~/^[A-Za-z0-9_.-]+$/; - static var LICENSES = ["GPL","LGPL","BSD","Public","MIT"]; + static var LICENSES = ["GPL","LGPL","BSD","Public","MIT", "MPL", "Other"]; static function requiredAttribute( x : Xml, name ) { var v = x.get(name); From 72479a437129c597a5c5ce46237b36070659bf57 Mon Sep 17 00:00:00 2001 From: Chris Speciale Date: Sat, 31 Aug 2024 09:57:57 -0400 Subject: [PATCH 02/11] Data: Apache? --- src/legacyhaxelib/Data.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/legacyhaxelib/Data.hx b/src/legacyhaxelib/Data.hx index cd4d7f77d..ee613dcc9 100644 --- a/src/legacyhaxelib/Data.hx +++ b/src/legacyhaxelib/Data.hx @@ -67,7 +67,7 @@ class Data { public static var DOCXML = "haxedoc.xml"; public static var REPOSITORY = "files"; public static var alphanum = ~/^[A-Za-z0-9_.-]+$/; - static var LICENSES = ["GPL","LGPL","BSD","Public","MIT", "MPL", "Other"]; + static var LICENSES = ["GPL","LGPL","BSD","Public","MIT", "Apache", "MPL", "Other"]; static function requiredAttribute( x : Xml, name ) { var v = x.get(name); From cf736d1854750c73d4662d73665200bde8f5ca61 Mon Sep 17 00:00:00 2001 From: Chris Speciale Date: Sat, 31 Aug 2024 09:59:05 -0400 Subject: [PATCH 03/11] schema.json: Support more license types --- schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema.json b/schema.json index 6744c768d..baea2804f 100644 --- a/schema.json +++ b/schema.json @@ -16,7 +16,7 @@ }, "license": { "description": "Open source license under which the project is licensed", - "enum": ["GPL", "LGPL", "BSD", "Public", "MIT", "Apache"] + "enum": ["GPL", "LGPL", "BSD", "Public", "MIT", "Apache", "MPL", "Other"] }, "version": { "$ref": "#/definitions/semver" }, "classPath": { From a297cb4d060e039f04519db07152a8c63f4be413 Mon Sep 17 00:00:00 2001 From: Chris Speciale Date: Sat, 31 Aug 2024 10:01:02 -0400 Subject: [PATCH 04/11] Data: More license types --- src/haxelib/Data.hx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/haxelib/Data.hx b/src/haxelib/Data.hx index 58e06923c..60faaf22d 100644 --- a/src/haxelib/Data.hx +++ b/src/haxelib/Data.hx @@ -190,6 +190,8 @@ typedef DefineDocumentation = { var Bsd = 'BSD'; var Public = 'Public'; var Apache = 'Apache'; + var Mpl = 'MPL'; + var Other = "Other"; @:disallowed var Unknown = 'Unknown'; } From 6277e650b87ba556ab70e226eb5ac8394215b525 Mon Sep 17 00:00:00 2001 From: Chris Speciale Date: Sat, 31 Aug 2024 10:07:26 -0400 Subject: [PATCH 05/11] TestSubmit: Allow more licenses --- test/tests/integration/TestSubmit.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/tests/integration/TestSubmit.hx b/test/tests/integration/TestSubmit.hx index 4b736bc89..961da787c 100644 --- a/test/tests/integration/TestSubmit.hx +++ b/test/tests/integration/TestSubmit.hx @@ -125,7 +125,7 @@ class TestSubmit extends IntegrationTests { final r = haxelib(["submit", Path.join([IntegrationTests.projectRoot, "test/libraries/libInvalidLicense.zip"]), bar.pw]).result(); assertFail(r); - assertEquals("Error: Invalid value `Unknown` for License. Allowed values: GPL, LGPL, MIT, BSD, Public, Apache", r.err.trim()); + assertEquals("Error: Invalid value `Unknown` for License. Allowed values: GPL, LGPL, MIT, BSD, Public, Apache, MPL, Other", r.err.trim()); final r = haxelib(["search", "Bar"]).result(); // did not get submitted From 91ce8d2845615faa820cd72892ce841d80cb2181 Mon Sep 17 00:00:00 2001 From: Chris Speciale Date: Sun, 1 Sep 2024 04:33:24 -0400 Subject: [PATCH 06/11] Data: Change "Other" license to Open-Source-Other --- src/legacyhaxelib/Data.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/legacyhaxelib/Data.hx b/src/legacyhaxelib/Data.hx index ee613dcc9..248cb99a0 100644 --- a/src/legacyhaxelib/Data.hx +++ b/src/legacyhaxelib/Data.hx @@ -67,7 +67,7 @@ class Data { public static var DOCXML = "haxedoc.xml"; public static var REPOSITORY = "files"; public static var alphanum = ~/^[A-Za-z0-9_.-]+$/; - static var LICENSES = ["GPL","LGPL","BSD","Public","MIT", "Apache", "MPL", "Other"]; + static var LICENSES = ["GPL","LGPL","BSD","Public","MIT", "Apache", "MPL", "Open-Source-Other"]; static function requiredAttribute( x : Xml, name ) { var v = x.get(name); From 99c54be5392beed9ecb4dad82b3e4bafe0d71554 Mon Sep 17 00:00:00 2001 From: Chris Speciale Date: Sun, 1 Sep 2024 04:34:42 -0400 Subject: [PATCH 07/11] schema.json: Change "Other" license to Open-Source-Other --- schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema.json b/schema.json index baea2804f..2fbbebb58 100644 --- a/schema.json +++ b/schema.json @@ -16,7 +16,7 @@ }, "license": { "description": "Open source license under which the project is licensed", - "enum": ["GPL", "LGPL", "BSD", "Public", "MIT", "Apache", "MPL", "Other"] + "enum": ["GPL", "LGPL", "BSD", "Public", "MIT", "Apache", "MPL", "Open-Source-Other"] }, "version": { "$ref": "#/definitions/semver" }, "classPath": { From 67740adccf5af5e326bc843dcfc60203c081a186 Mon Sep 17 00:00:00 2001 From: Chris Speciale Date: Sun, 1 Sep 2024 04:36:07 -0400 Subject: [PATCH 08/11] Data: Change "Other" license to Open-Source-Other --- src/haxelib/Data.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/haxelib/Data.hx b/src/haxelib/Data.hx index 60faaf22d..5b5cac848 100644 --- a/src/haxelib/Data.hx +++ b/src/haxelib/Data.hx @@ -191,7 +191,7 @@ typedef DefineDocumentation = { var Public = 'Public'; var Apache = 'Apache'; var Mpl = 'MPL'; - var Other = "Other"; + var Other = "Open-Source-Other"; @:disallowed var Unknown = 'Unknown'; } From 7866a01d5cb43b3738e918c6e6fb6412a974b29e Mon Sep 17 00:00:00 2001 From: Chris Speciale Date: Sun, 1 Sep 2024 04:38:09 -0400 Subject: [PATCH 09/11] Update TestSubmit.hx --- test/tests/integration/TestSubmit.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/tests/integration/TestSubmit.hx b/test/tests/integration/TestSubmit.hx index 961da787c..106f0619d 100644 --- a/test/tests/integration/TestSubmit.hx +++ b/test/tests/integration/TestSubmit.hx @@ -125,7 +125,7 @@ class TestSubmit extends IntegrationTests { final r = haxelib(["submit", Path.join([IntegrationTests.projectRoot, "test/libraries/libInvalidLicense.zip"]), bar.pw]).result(); assertFail(r); - assertEquals("Error: Invalid value `Unknown` for License. Allowed values: GPL, LGPL, MIT, BSD, Public, Apache, MPL, Other", r.err.trim()); + assertEquals("Error: Invalid value `Unknown` for License. Allowed values: GPL, LGPL, MIT, BSD, Public, Apache, MPL, Open-Source-Other", r.err.trim()); final r = haxelib(["search", "Bar"]).result(); // did not get submitted From f6277b6758f018aa96a2f5efc04df36355e78df7 Mon Sep 17 00:00:00 2001 From: Chris Speciale Date: Sun, 1 Sep 2024 10:07:38 -0400 Subject: [PATCH 10/11] Revert some changes Reverts some changes to only designate MPL as an added option. I think this closes the gap as these are the most widely used OSI licenses. --- schema.json | 2 +- src/haxelib/Data.hx | 1 - src/legacyhaxelib/Data.hx | 2 +- test/tests/integration/TestSubmit.hx | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/schema.json b/schema.json index 2fbbebb58..8a2d13a57 100644 --- a/schema.json +++ b/schema.json @@ -16,7 +16,7 @@ }, "license": { "description": "Open source license under which the project is licensed", - "enum": ["GPL", "LGPL", "BSD", "Public", "MIT", "Apache", "MPL", "Open-Source-Other"] + "enum": ["GPL", "LGPL", "BSD", "Public", "MIT", "Apache", "MPL"] }, "version": { "$ref": "#/definitions/semver" }, "classPath": { diff --git a/src/haxelib/Data.hx b/src/haxelib/Data.hx index 5b5cac848..6e2c42d25 100644 --- a/src/haxelib/Data.hx +++ b/src/haxelib/Data.hx @@ -191,7 +191,6 @@ typedef DefineDocumentation = { var Public = 'Public'; var Apache = 'Apache'; var Mpl = 'MPL'; - var Other = "Open-Source-Other"; @:disallowed var Unknown = 'Unknown'; } diff --git a/src/legacyhaxelib/Data.hx b/src/legacyhaxelib/Data.hx index 248cb99a0..26bf3ef2a 100644 --- a/src/legacyhaxelib/Data.hx +++ b/src/legacyhaxelib/Data.hx @@ -67,7 +67,7 @@ class Data { public static var DOCXML = "haxedoc.xml"; public static var REPOSITORY = "files"; public static var alphanum = ~/^[A-Za-z0-9_.-]+$/; - static var LICENSES = ["GPL","LGPL","BSD","Public","MIT", "Apache", "MPL", "Open-Source-Other"]; + static var LICENSES = ["GPL","LGPL","BSD","Public","MIT", "Apache", "MPL"]; static function requiredAttribute( x : Xml, name ) { var v = x.get(name); diff --git a/test/tests/integration/TestSubmit.hx b/test/tests/integration/TestSubmit.hx index 106f0619d..80de46e78 100644 --- a/test/tests/integration/TestSubmit.hx +++ b/test/tests/integration/TestSubmit.hx @@ -125,7 +125,7 @@ class TestSubmit extends IntegrationTests { final r = haxelib(["submit", Path.join([IntegrationTests.projectRoot, "test/libraries/libInvalidLicense.zip"]), bar.pw]).result(); assertFail(r); - assertEquals("Error: Invalid value `Unknown` for License. Allowed values: GPL, LGPL, MIT, BSD, Public, Apache, MPL, Open-Source-Other", r.err.trim()); + assertEquals("Error: Invalid value `Unknown` for License. Allowed values: GPL, LGPL, MIT, BSD, Public, Apache, MPL", r.err.trim()); final r = haxelib(["search", "Bar"]).result(); // did not get submitted From debd198ca445d1ebdb3ad738dd5f829a10368c6a Mon Sep 17 00:00:00 2001 From: Chris Speciale Date: Mon, 2 Sep 2024 14:52:51 -0400 Subject: [PATCH 11/11] Dont need to change legacy --- src/legacyhaxelib/Data.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/legacyhaxelib/Data.hx b/src/legacyhaxelib/Data.hx index 26bf3ef2a..e15a567bd 100644 --- a/src/legacyhaxelib/Data.hx +++ b/src/legacyhaxelib/Data.hx @@ -67,7 +67,7 @@ class Data { public static var DOCXML = "haxedoc.xml"; public static var REPOSITORY = "files"; public static var alphanum = ~/^[A-Za-z0-9_.-]+$/; - static var LICENSES = ["GPL","LGPL","BSD","Public","MIT", "Apache", "MPL"]; + static var LICENSES = ["GPL","LGPL","BSD","Public","MIT"]; static function requiredAttribute( x : Xml, name ) { var v = x.get(name);