Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions build/src/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interface ModDb {
[name: string]: {
name: string,
description: string,
licence: string,
license?: string,
page: Page[],
archive_link: string,
hash: {
Expand Down Expand Up @@ -63,11 +63,11 @@ export async function writeMods(db: PackageDB): Promise<void> {
mods[name] = {
name: pkg.metadata.ccmodHumanName || name,
description: pkg.metadata.description || 'A mod. (Description not available; contact mod author and have them add a description to their package.json file)',
licence: pkg.metadata.license!,
license: pkg.metadata.license,
page: getHomepage(pkg.metadata.homepage),
archive_link: install.url,
hash: install.hash,
version: pkg.metadata.version || '0.1.0',
version: pkg.metadata.version,
};
}

Expand Down Expand Up @@ -143,8 +143,8 @@ function check(pkg: PkgMetadata): boolean {
}

if (!pkg.version) {
console.warn(`Package is missing version: ${pkg.name}; correct ASAP`);
return true;
console.warn(`Package is missing version: ${pkg.name}`);
return false;
}

if (semver.parse(pkg.version) == null) {
Expand Down
3 changes: 1 addition & 2 deletions build/src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ declare type PkgMetadata = {
// If not provided, defaults to "mod".
ccmodType?: PackageType;
// This is the version of the package for dependency purposes. (see https://docs.npmjs.com/files/package.json )
// If not present, assumed to be "0.0.0". NEW MODS WITHOUT VERSIONS WILL NOT BE ACCEPTED.
version?: Semver;
version: Semver;
// This is the dependencies of the package, if any. If not present, `dependencies` is checked.
// If `dependencies` contains NPM packages, you must supply at least an empty object here to prevent issues.
ccmodDependencies?: Record<string, SemverConstraint>;
Expand Down
14 changes: 7 additions & 7 deletions mods.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
"Localize Me": {
"name": "Localize Me",
"description": "Add support for more locales, languages and translations",
"licence": "MIT",
"license": "MIT",
"page": [
{
"name": "GitHub",
Expand Down Expand Up @@ -244,7 +244,7 @@
"Restart Button": {
"name": "Restart Button",
"description": "Adds a button to restart the game without memory leaks",
"licence": "MIT",
"license": "MIT",
"page": [
{
"name": "GitHub",
Expand Down Expand Up @@ -295,7 +295,7 @@
"crosscode-ru": {
"name": "crosscode-ru",
"description": "Russian translation for CrossCode",
"licence": "(MIT AND CC-BY-4.0)",
"license": "(MIT AND CC-BY-4.0)",
"page": [
{
"name": "GitHub",
Expand All @@ -311,7 +311,7 @@
"enhanced-ui": {
"name": "Enhanced UI",
"description": "Various GUI enchancments and fixes",
"licence": "MIT",
"license": "MIT",
"page": [
{
"name": "GitHub",
Expand Down Expand Up @@ -362,7 +362,7 @@
"jetpack": {
"name": "jetpack",
"description": "Turns your CTRL key into a jetpack.",
"licence": "MIT",
"license": "MIT",
"page": [
{
"name": "GitHub",
Expand Down Expand Up @@ -428,7 +428,7 @@
"slowmotion": {
"name": "slowmotion",
"description": "Turns your C key into a slowmotion controller.",
"licence": "MIT",
"license": "MIT",
"page": [
{
"name": "GitHub",
Expand Down Expand Up @@ -474,7 +474,7 @@
"timewalker": {
"name": "timewalker",
"description": "Lets you control time.",
"licence": "MIT",
"license": "MIT",
"page": [
{
"name": "GitHub",
Expand Down
3 changes: 1 addition & 2 deletions npDatabaseFormat.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ declare type PackageDBPackageMetadata = {
// If not provided, defaults to "mod".
ccmodType?: PackageDBPackageType;
// This is the version of the package for dependency purposes. (see https://docs.npmjs.com/files/package.json )
// If not present, assumed to be "0.0.0". NEW MODS WITHOUT VERSIONS WILL NOT BE ACCEPTED.
version?: Semver;
version: Semver;
// This is the dependencies of the package, if any. If not present, `dependencies` is checked.
// If `dependencies` contains NPM packages, you must supply at least an empty object here to prevent issues.
ccmodDependencies?: Record<string, SemverConstraint>;
Expand Down