From 44acc9311ca3ba4a0580bc296b646879ebefde17 Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Mon, 9 Mar 2020 13:22:26 -0500 Subject: Update dependencies --- package.json | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) (limited to 'package.json') diff --git a/package.json b/package.json index e41927a..2d983b9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,8 @@ { "name": "@serpentity/serpentity", "description": "An Entity-Component-System Engine", - "version": "2.1.0", + "version": "3.0.0", + "type": "module", "contributors": [ { "name": "Rubén Beltrán del Río", @@ -14,22 +15,28 @@ "url": "https://github.com/serpentity/serpentity.git" }, "dependencies": { - "events": "^2.0.0" + "events": "^3.1.0" }, "devDependencies": { - "babel-core": "^6.24.1", - "babel-loader": "^6.4.1", - "babel-preset-es2015": "^6.24.1", - "code": "^4.0.0", - "eslint": "^3.19.0", - "eslint-config-hapi": "^10.0.0", - "eslint-plugin-hapi": "^4.0.0", - "lab": "^13.0.1", - "webpack": "^2.3.3" + "@hapi/code": "^8.0.1", + "@hapi/eslint-config-hapi": "^13.0.2", + "@hapi/eslint-plugin-hapi": "^4.3.5", + "@hapi/lab": "^22.0.3", + "@babel/core": "^7.8.7", + "@babel/preset-env": "^7.8.7", + "babel-loader": "8.0.6", + "eslint": "^6.8.0", + "webpack": "^4.42.0", + "webpack-cli": "^3.3.11" }, "engines": { - "node": ">= 6.0.0" + "node": ">= 12.0.0" }, + "browserslist": [ + "last 2 versions", + "not IE", + "not IE_mob" + ], "scripts": { "build": "webpack --config ./config/webpack.js", "lint": "eslint lib", -- cgit From 4d4216690096dc8d300254e8752a4830df1c0f2d Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Mon, 9 Mar 2020 13:23:52 -0500 Subject: Adapt integration tests --- package.json | 2 +- test/integration.js | 300 ++++++++++++++++++++++++---------------------------- 2 files changed, 139 insertions(+), 163 deletions(-) (limited to 'package.json') diff --git a/package.json b/package.json index 2d983b9..e27c256 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "scripts": { "build": "webpack --config ./config/webpack.js", "lint": "eslint lib", - "test": "lab" + "test": "node test/integration.js" }, "main": "./lib/serpentity.js" } diff --git a/test/integration.js b/test/integration.js index 5b6e595..70109eb 100644 --- a/test/integration.js +++ b/test/integration.js @@ -1,11 +1,10 @@ -'use strict'; - -const Code = require('code'); // assertion library -const Lab = require('lab'); -const Serpentity = require('..'); +import Code from '@hapi/code'; // assertion library +import Lab from '@hapi/lab'; +import Serpentity, { Component, Entity, Node, System } from '../lib/serpentity.js'; const internals = { - system: class TestSystem extends Serpentity.System { + context: {}, + system: class TestSystem extends System { added(engine) { this.testNodes = engine.getNodes(internals.node); @@ -33,7 +32,7 @@ const internals = { while (Date.now() === this.updateCalled) { /* pass some time */ } } }, - component: class TestComponent extends Serpentity.Component { + component: class TestComponent extends Component { constructor(config) { super(config); @@ -41,7 +40,7 @@ const internals = { this.called = false; } }, - node: class TestNode extends Serpentity.Node {}, + node: class TestNode extends Node {}, delta: 10 }; @@ -50,261 +49,238 @@ internals.node.types = { test: internals.component }; -const lab = exports.lab = Lab.script(); +const lab = Lab.script({ + schedule: false +}); + +const { beforeEach, experiment, test } = lab; +const { expect } = Code; -lab.experiment('loading', () => { +experiment('loading', () => { - lab.test('Serpentity should be exported', (done) => { + test('Serpentity should be exported', () => { - Code.expect(typeof Serpentity).to.not.be.undefined(); - done(); + expect(typeof Serpentity).to.not.be.undefined(); }); - lab.test('Serpentity should include the Entity class', (done) => { + test('Serpentity should include the Entity class', () => { - Code.expect(typeof Serpentity.Entity).to.not.be.undefined(); - done(); + expect(typeof Entity).to.not.be.undefined(); }); - lab.test('Serpentity should include the Component class', (done) => { + test('Serpentity should include the Component class', () => { - Code.expect(typeof Serpentity.Component).to.not.be.undefined(); - done(); + expect(typeof Component).to.not.be.undefined(); }); - lab.test('Serpentity should include the System class', (done) => { + test('Serpentity should include the System class', () => { - Code.expect(typeof Serpentity.System).to.not.be.undefined(); - done(); + expect(typeof System).to.not.be.undefined(); }); - lab.test('Serpentity should include the Node class', (done) => { + test('Serpentity should include the Node class', () => { - Code.expect(typeof Serpentity.Node).to.not.be.undefined(); - done(); + expect(typeof Node).to.not.be.undefined(); }); - lab.test('Serpentity should include the NodeCollection class', (done) => { + test('Serpentity should include the NodeCollection class', () => { - Code.expect(typeof Serpentity.NodeCollection).to.not.be.undefined(); - done(); + expect(typeof NodeCollection).to.not.be.undefined(); }); }); -lab.experiment('Engine Tests', () => { +experiment('Engine Tests', () => { - lab.beforeEach((done) => { + beforeEach(() => { - this.engine = new Serpentity(); + internals.context.engine = new Serpentity(); - this.regularSystem = new internals.system(); - this.highPrioritySystem = new internals.system(); - this.lowPrioritySystem = new internals.system(); + internals.context.regularSystem = new internals.system(); + internals.context.highPrioritySystem = new internals.system(); + internals.context.lowPrioritySystem = new internals.system(); - this.firstEntity = new Serpentity.Entity(); - this.firstEntity.addComponent(new internals.component()); - this.secondEntity = new Serpentity.Entity(); - this.secondEntity.addComponent(new internals.component()); - this.emptyEntity = new Serpentity.Entity(); + internals.context.firstEntity = new Entity(); + internals.context.firstEntity.addComponent(new internals.component()); + internals.context.secondEntity = new Entity(); + internals.context.secondEntity.addComponent(new internals.component()); + internals.context.emptyEntity = new Entity(); // Add entity before the systems - this.engine.addEntity(this.firstEntity); + internals.context.engine.addEntity(internals.context.firstEntity); - this.engine.addSystem(this.regularSystem, 100); - this.engine.addSystem(this.highPrioritySystem, 0); - this.engine.addSystem(this.lowPrioritySystem, 1000); + internals.context.engine.addSystem(internals.context.regularSystem, 100); + internals.context.engine.addSystem(internals.context.highPrioritySystem, 0); + internals.context.engine.addSystem(internals.context.lowPrioritySystem, 1000); // Add entity after the systems - this.engine.addEntity(this.secondEntity); - this.engine.addEntity(this.emptyEntity); - - done(); + internals.context.engine.addEntity(internals.context.secondEntity); + internals.context.engine.addEntity(internals.context.emptyEntity); }); - lab.test('Engine should call added callback on added systems', (done) => { + test('Engine should call added callback on added systems', () => { // Ensure the added callback is being called - Code.expect(this.regularSystem.addedCalled).to.be.true(); - Code.expect(this.highPrioritySystem.addedCalled).to.be.true(); - Code.expect(this.lowPrioritySystem.addedCalled).to.be.true(); - - done(); + expect(internals.context.regularSystem.addedCalled).to.be.true(); + expect(internals.context.highPrioritySystem.addedCalled).to.be.true(); + expect(internals.context.lowPrioritySystem.addedCalled).to.be.true(); }); - lab.test('Engine should send the engine instance in added callback', (done) => { + test('Engine should send the engine instance in added callback', () => { // Ensure the added callback is sending the engine - Code.expect(this.regularSystem.addedEngine instanceof Serpentity).to.be.true(); - Code.expect(this.highPrioritySystem.addedEngine instanceof Serpentity).to.be.true(); - Code.expect(this.lowPrioritySystem.addedEngine instanceof Serpentity).to.be.true(); - - done(); + expect(internals.context.regularSystem.addedEngine instanceof Serpentity).to.be.true(); + expect(internals.context.highPrioritySystem.addedEngine instanceof Serpentity).to.be.true(); + expect(internals.context.lowPrioritySystem.addedEngine instanceof Serpentity).to.be.true(); }); - lab.test('Engine should not add duplicate systems', (done) => { + test('Engine should not add duplicate systems', () => { - const originalSystemsLength = this.engine.systems.length; - const added = this.engine.addSystem(this.regularSystem, 0); - const newSystemsLength = this.engine.systems.length; + const originalSystemsLength = internals.context.engine.systems.length; + const added = internals.context.engine.addSystem(internals.context.regularSystem, 0); + const newSystemsLength = internals.context.engine.systems.length; // Ensure we don't add the same system twice - Code.expect(added).to.be.false(); - Code.expect(originalSystemsLength).to.be.equal(newSystemsLength); - - done(); + expect(added).to.be.false(); + expect(originalSystemsLength).to.be.equal(newSystemsLength); }); - lab.test('Engine should call update callback on added systems', (done) => { + test('Engine should call update callback on added systems', () => { - this.engine.update(internals.delta); + internals.context.engine.update(internals.delta); // Ensure update function called - Code.expect(!!this.regularSystem.updateCalled).to.be.true(); - Code.expect(!!this.highPrioritySystem.updateCalled).to.be.true(); - Code.expect(!!this.lowPrioritySystem.updateCalled).to.be.true(); - - done(); + expect(!!internals.context.regularSystem.updateCalled).to.be.true(); + expect(!!internals.context.highPrioritySystem.updateCalled).to.be.true(); + expect(!!internals.context.lowPrioritySystem.updateCalled).to.be.true(); }); - lab.test('Engine should call update callback in the order of priorities', (done) => { + test('Engine should call update callback in the order of priorities', () => { - this.engine.update(internals.delta); + internals.context.engine.update(internals.delta); // Ensure order of priorities - Code.expect(this.regularSystem.updateCalled).to.be.lessThan(this.lowPrioritySystem.updateCalled); - Code.expect(this.regularSystem.updateCalled).to.be.greaterThan(this.highPrioritySystem.updateCalled); - - done(); + expect(internals.context.regularSystem.updateCalled).to.be.lessThan(internals.context.lowPrioritySystem.updateCalled); + expect(internals.context.regularSystem.updateCalled).to.be.greaterThan(internals.context.highPrioritySystem.updateCalled); }); - lab.test('Engine should send the delta in the update callback', (done) => { + test('Engine should send the delta in the update callback', () => { - this.engine.update(internals.delta); + internals.context.engine.update(internals.delta); // Ensure delta is being sent - Code.expect(this.regularSystem.updateDt).to.be.equal(internals.delta); - Code.expect(this.highPrioritySystem.updateDt).to.be.equal(internals.delta); - Code.expect(this.lowPrioritySystem.updateDt).to.be.equal(internals.delta); - - done(); + expect(internals.context.regularSystem.updateDt).to.be.equal(internals.delta); + expect(internals.context.highPrioritySystem.updateDt).to.be.equal(internals.delta); + expect(internals.context.lowPrioritySystem.updateDt).to.be.equal(internals.delta); }); - lab.test('System remove callback', (done) => { + test('System remove callback', () => { - const originalSystemLength = this.engine.systems.length; - const originalRemoved = this.engine.removeSystem(this.lowPrioritySystem); - const intermediateSystemLength = this.engine.systems.length; - const finalRemoved = this.engine.removeSystem(this.lowPrioritySystem); - const finalSystemLength = this.engine.systems.length; - this.engine.update(internals.delta); + const originalSystemLength = internals.context.engine.systems.length; + const originalRemoved = internals.context.engine.removeSystem(internals.context.lowPrioritySystem); + const intermediateSystemLength = internals.context.engine.systems.length; + const finalRemoved = internals.context.engine.removeSystem(internals.context.lowPrioritySystem); + const finalSystemLength = internals.context.engine.systems.length; + internals.context.engine.update(internals.delta); - // Check for return value - Code.expect(originalRemoved).to.be.true(); - Code.expect(finalRemoved).to.be.false(); + // Check for return value + expect(originalRemoved).to.be.true(); + expect(finalRemoved).to.be.false(); // Confirm that only removed if found by checking length of systems // array - Code.expect(originalSystemLength).to.be.above(intermediateSystemLength); - Code.expect(finalSystemLength).to.be.equal(intermediateSystemLength); + expect(originalSystemLength).to.be.above(intermediateSystemLength); + expect(finalSystemLength).to.be.equal(intermediateSystemLength); // Ensure callback is sent - Code.expect(!!this.regularSystem.removedCalled).to.be.false(); - Code.expect(!!this.highPrioritySystem.removedCalled).to.be.false(); - Code.expect(!!this.lowPrioritySystem.removedCalled).to.be.true(); + expect(!!internals.context.regularSystem.removedCalled).to.be.false(); + expect(!!internals.context.highPrioritySystem.removedCalled).to.be.false(); + expect(!!internals.context.lowPrioritySystem.removedCalled).to.be.true(); // Ensure update is no longer sent - Code.expect(!!this.regularSystem.updateCalled).to.be.true(); - Code.expect(!!this.highPrioritySystem.updateCalled).to.be.true(); - Code.expect(!!this.lowPrioritySystem.updateCalled).to.be.false(); - - done(); + expect(!!internals.context.regularSystem.updateCalled).to.be.true(); + expect(!!internals.context.highPrioritySystem.updateCalled).to.be.true(); + expect(!!internals.context.lowPrioritySystem.updateCalled).to.be.false(); }); - lab.test('Entity node selection', (done) => { + test('Entity node selection', () => { - this.engine.update(internals.delta); + internals.context.engine.update(internals.delta); // Ensure component is called for each entity - Code.expect(!!this.firstEntity._components[0].called).to.be.true(); - Code.expect(!!this.secondEntity._components[0].called).to.be.true(); + expect(!!internals.context.firstEntity._components[0].called).to.be.true(); + expect(!!internals.context.secondEntity._components[0].called).to.be.true(); // Ensure entity not in node collection not called - Code.expect(!!this.firstEntity.called).to.be.true(); - Code.expect(!!this.secondEntity.called).to.be.true(); - Code.expect(!!this.emptyEntity.called).to.be.false(); - - done(); + expect(!!internals.context.firstEntity.called).to.be.true(); + expect(!!internals.context.secondEntity.called).to.be.true(); + expect(!!internals.context.emptyEntity.called).to.be.false(); }); - lab.test('Entity node removal', (done) => { + test('Entity node removal', () => { - this.engine.removeEntity(this.secondEntity); - this.engine.update(internals.delta); + internals.context.engine.removeEntity(internals.context.secondEntity); + internals.context.engine.update(internals.delta); - Code.expect(!!this.firstEntity._components[0].called).to.be.true(); - Code.expect(!!this.secondEntity._components[0].called).to.be.false(); + expect(!!internals.context.firstEntity._components[0].called).to.be.true(); + expect(!!internals.context.secondEntity._components[0].called).to.be.false(); - Code.expect(!!this.firstEntity.called).to.be.true(); - Code.expect(!!this.secondEntity.called).to.be.false(); - Code.expect(!!this.emptyEntity.called).to.be.false(); - - done(); + expect(!!internals.context.firstEntity.called).to.be.true(); + expect(!!internals.context.secondEntity.called).to.be.false(); + expect(!!internals.context.emptyEntity.called).to.be.false(); }); - lab.test('Entity should not add duplicate components', (done) => { - const originalComponentsLength = this.secondEntity._components.length; - const result = this.secondEntity.addComponent(new internals.component()); - const newComponentsLength = this.secondEntity._components.length; + test('Entity should not add duplicate components', () => { - Code.expect(result).to.be.false(); - Code.expect(originalComponentsLength).to.be.equal(newComponentsLength); + const originalComponentsLength = internals.context.secondEntity._components.length; + const result = internals.context.secondEntity.addComponent(new internals.component()); + const newComponentsLength = internals.context.secondEntity._components.length; - done(); + expect(result).to.be.false(); + expect(originalComponentsLength).to.be.equal(newComponentsLength); }); - lab.test('Entity should allow access to components by class', (done) => { - const firstComponent = this.firstEntity.getComponent(internals.component); - const emptyComponent = this.emptyEntity.getComponent(internals.component); + test('Entity should allow access to components by class', () => { - Code.expect(firstComponent instanceof internals.component).to.be.true(); - Code.expect(emptyComponent).to.be.equal(undefined); + const firstComponent = internals.context.firstEntity.getComponent(internals.component); + const emptyComponent = internals.context.emptyEntity.getComponent(internals.component); - done(); + expect(firstComponent instanceof internals.component).to.be.true(); + expect(emptyComponent).to.be.equal(undefined); }); - lab.test('Engine should not add duplicate entities', (done) => { - const originalEntitiesLength = this.engine.entities.length; - const added = this.engine.addEntity(this.firstEntity); - const finalEntitiesLength = this.engine.entities.length; + test('Engine should not add duplicate entities', () => { + + const originalEntitiesLength = internals.context.engine.entities.length; + const added = internals.context.engine.addEntity(internals.context.firstEntity); + const finalEntitiesLength = internals.context.engine.entities.length; - Code.expect(added).to.be.false(); + expect(added).to.be.false(); - Code.expect(originalEntitiesLength).to.be.equal(finalEntitiesLength); - done(); + expect(originalEntitiesLength).to.be.equal(finalEntitiesLength); }); - lab.test('Engine should remove entities', (done) => { + test('Engine should remove entities', () => { - const originalEntityLength = this.engine.entities.length; - const originalRemoved = this.engine.removeEntity(this.firstEntity); - const intermediateEntityLength = this.engine.entities.length; - const finalRemoved = this.engine.removeEntity(this.firstEntity); - const finalEntityLength = this.engine.entities.length; - this.engine.update(internals.delta); + const originalEntityLength = internals.context.engine.entities.length; + const originalRemoved = internals.context.engine.removeEntity(internals.context.firstEntity); + const intermediateEntityLength = internals.context.engine.entities.length; + const finalRemoved = internals.context.engine.removeEntity(internals.context.firstEntity); + const finalEntityLength = internals.context.engine.entities.length; + internals.context.engine.update(internals.delta); - // Check for return value - Code.expect(originalRemoved).to.be.true(); - Code.expect(finalRemoved).to.be.false(); + // Check for return value + expect(originalRemoved).to.be.true(); + expect(finalRemoved).to.be.false(); // Confirm that only removed if found by checking length of systems // array - Code.expect(originalEntityLength).to.be.above(intermediateEntityLength); - Code.expect(finalEntityLength).to.be.equal(intermediateEntityLength); + expect(originalEntityLength).to.be.above(intermediateEntityLength); + expect(finalEntityLength).to.be.equal(intermediateEntityLength); // Ensure callback is sent - Code.expect(!!this.firstEntity.called).to.be.false(); - Code.expect(!!this.secondEntity.called).to.be.true(); - - done(); + expect(!!internals.context.firstEntity.called).to.be.false(); + expect(!!internals.context.secondEntity.called).to.be.true(); }); }); + +Lab.report(lab).then((result) => process.exit(result.code)); -- cgit From 5f26f629b590a26ca90f6be48b107d875343358c Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Mon, 9 Mar 2020 13:37:47 -0500 Subject: Update license and changelog --- CHANGELOG.md | 24 ++++--- LICENSE | 222 +++++++++++++++++++++++++++++++++++++++++++++++++++++------ package.json | 5 +- 3 files changed, 220 insertions(+), 31 deletions(-) (limited to 'package.json') diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a172a7..b1c155a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [3.0.0] - 2020-03-09 +### Changed +- Use module syntax +- Update dependencies +- Use Apache-2.0 license +- References to github corrected to point to gitlab + ## [2.1.0] - 2017-04-12 ### Added - Events dependency @@ -57,11 +64,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Added - Initial Release -[Unreleased]: https://github.com/serpentity/serpentity/compare/master...develop -[v0.1.4]: https://github.com/serpentity/serpentity/compare/v0.1.3...v0.1.4 -[v0.1.5]: https://github.com/serpentity/serpentity/compare/v0.1.4...v0.1.5 -[v0.1.6]: https://github.com/serpentity/serpentity/compare/v0.1.5...v0.1.6 -[v0.1.7]: https://github.com/serpentity/serpentity/compare/v0.1.6...v0.1.7 -[1.0.0]: https://github.com/serpentity/serpentity/compare/v0.1.7...1.0.0 -[2.0.0]: https://github.com/serpentity/serpentity/compare/1.0.0...2.0.0 -[2.1.0]: https://github.com/serpentity/serpentity/compare/2.0.0...2.1.0 +[Unreleased]: https://gitlab.com/serpentity/serpentity/compare/master...develop +[v0.1.4]: https://gitlab.com/serpentity/serpentity/compare/v0.1.3...v0.1.4 +[v0.1.5]: https://gitlab.com/serpentity/serpentity/compare/v0.1.4...v0.1.5 +[v0.1.6]: https://gitlab.com/serpentity/serpentity/compare/v0.1.5...v0.1.6 +[v0.1.7]: https://gitlab.com/serpentity/serpentity/compare/v0.1.6...v0.1.7 +[1.0.0]: https://gitlab.com/serpentity/serpentity/compare/v0.1.7...1.0.0 +[2.0.0]: https://gitlab.com/serpentity/serpentity/compare/1.0.0...2.0.0 +[2.1.0]: https://gitlab.com/serpentity/serpentity/compare/2.0.0...2.1.0 +[3.0.0]: https://gitlab.com/serpentity/serpentity/compare/2.1.0...3.0.0 diff --git a/LICENSE b/LICENSE index 0221543..497db7d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,201 @@ -The MIT License (MIT) - -Copyright (c) 2014 Ben Beltran - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018 Rubén Beltran del Río + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/package.json b/package.json index e27c256..aa2c132 100644 --- a/package.json +++ b/package.json @@ -3,16 +3,17 @@ "description": "An Entity-Component-System Engine", "version": "3.0.0", "type": "module", + "license": "Apache-2.0", "contributors": [ { "name": "Rubén Beltrán del Río", - "email": "ben@nsovocal.com", + "email": "subscriptions@unlimited.pizza", "url": "https://unlimited.pizza" } ], "repository": { "type": "git", - "url": "https://github.com/serpentity/serpentity.git" + "url": "https://gitlab.com/serpentity/serpentity.git" }, "dependencies": { "events": "^3.1.0" -- cgit