1
0
Fork 0
Commit Graph

832 Commits (3d3cb42982b0380ebbdd8e74b69f1cb11c4b37d0)

Author SHA1 Message Date
Mike Gerwitz 3d3cb42982 Corrected @setfilename for easejs.texi 2013-12-22 01:05:30 -05:00
Mike Gerwitz 6280186926 Added necessary EXTRA_DIST files for successful dist build 2013-12-22 01:05:30 -05:00
Mike Gerwitz e1fdc92beb package.json is now generated by configure script and included in distribution 2013-12-22 01:05:28 -05:00
Mike Gerwitz 465fe35831
Merge branch 'brandon/gnu' into gnu 2013-12-22 00:00:29 -05:00
Mike Gerwitz efc82bb9a9 {manual=>easejs}.texi
Brandon Invergo recommended the name change so that the info file was
identifiable after installation.
2013-12-21 23:58:02 -05:00
Mike Gerwitz b338a2bf0f Changed README to mention autoreconf
As suggested by Brandon Invergo.
2013-12-21 23:47:13 -05:00
Mike Gerwitz 9ec3529b60 verset will no longer update version.tex; deprecated by previous commit 2013-12-21 23:43:47 -05:00
Brandon Invergo f9bb93c54d Applied autotool-related patch by Brandon Invergo
On Sat, Dec 21, 2013 at 12:29:23PM +0000, Brandon Invergo wrote:
> - configure.ac: add "foreign" to the AM_INIT statement so you don't have
>   to do it from the command line
>
> - configure.ac: add a test for midair -p, which is standard boilerplate
>   stuff
>
> - configure.ac: let the user dictate the locations of the java, node and
>   closure-compiler executables via the JAVA, NODE and CCJAR environment
>   variables
>
> - Makefile.am: use the MKDIR_P and CCJAR environment variables insntead
>   of hard-coded paths
>
> - doc/Makefile: rename to doc/Makefile.am
>
> - doc/Makefile.am: remove manual infodoc handling; Automake can automate
>   this stuff
>
> - doc/Makefile.am: support installing the documentation (install-plain,
>   install-pdf, install-html), which gets installed usually to
>   ${prefix}/share/doc/easejs (i.e. /usr/share/doc/easejs)
>
> - doc/classes.texi: fix some @ref macros
>
> - doc/manual.texi: fix the @include location
2013-12-21 23:31:45 -05:00
Mike Gerwitz 21ae1861ad
Version set to 0.2.0-dev 2013-12-21 01:51:54 -05:00
Mike Gerwitz 6c4c2322bb
Modified tools/version to update package.json and configure.ac 2013-12-21 01:49:48 -05:00
Mike Gerwitz 10bf2540c7
Updated README to reflect that --add-missing must be provided with automake invocation 2013-12-21 01:24:34 -05:00
Mike Gerwitz e759d1f2b7
Now using automake and autoconf
This implements recommendations by Brandon Invergo for the GNU submission
process, some of which is required by the GNU Coding Standards; I thank him for
his help and swift responses during this time.
2013-12-21 01:15:32 -05:00
Mike Gerwitz ab49c53f4b
Added gitlog-to-{authors,news}
These will be used to generate, respectively, the AUTHORS and NEWS files that
are a part of GNU distributions.
2013-12-21 00:59:56 -05:00
Mike Gerwitz 3cbf4aff40
Imported gitlog-to-changelog from gnulib
This will be used to generate ChangeLog, which is recommended by GNU.
2013-12-21 00:50:27 -05:00
Mike Gerwitz 8883aa930e
[copyright] Copyright update for license templates 2013-12-20 01:17:28 -05:00
Mike Gerwitz 34a36b8e1d
Updated copyright script to place current date in license templates 2013-12-20 01:17:07 -05:00
Mike Gerwitz 13ca9cd852
[copyright] Copyright update after relicensing 2013-12-20 01:11:39 -05:00
Mike Gerwitz 9050c4e4ac
Relicensed under the GPLv3+
This project was originally LGPLv+-licensed to encourage its use in a community
that is largely copyleft-phobic. After further reflection, that was a mistake,
as adoption is not the important factor here---software freedom is.

When submitting ease.js to the GNU project, it was asked if I would be willing
to relicense it under the GPLv3+; I agreed happily, because there is no reason
why we should provide proprietary software any sort of edge. Indeed, proprietary
JavaScript is a huge problem since it is automatically downloaded on the user's
PC generally without them even knowing, and is a current focus for the FSF. As
such, to remain firm in our stance against proprietary JavaScript, relicensing
made the most sense for GNU.

This is likely to upset current users of ease.js. I am not sure of their
number---I have only seen download counts periodically on npmjs.org---but I know
there are at least a small number. These users are free to continue using the
previous LGPL'd releases, but with the understanding that there will be no
further maintenance (not even bug fixes). If possible, users should use the
GPL-licensed versions and release their software as free software.

Here comes GNU ease.js.
2013-12-20 01:10:05 -05:00
Mike Gerwitz 2a76be2461
[copyright] Copyright update 2013-12-20 00:50:54 -05:00
Mike Gerwitz 9648dc283f
Added copyright script to update copyright lines based on file history 2013-12-20 00:48:55 -05:00
Mike Gerwitz daae0c6843
Corrected bug whereby multiple override calls would clear __super too early
Before this change, __super was set to undefined. However, consider that we have two
method overrides---foo and bar---and the code for bar is:

  this.foo();
  this.__super();

foo() would set __super to undefined and so bar cannot invoke its super method
unless it stores a reference to __super before invoking foo(). This patch fixes
this issue.
2013-04-20 21:55:40 -04:00
Mike Gerwitz ae172a7a34
Corrected missing whitespace on interface instantiation error message 2013-04-13 12:34:52 -04:00
Mike Gerwitz b4fe08292f
'this' now properly binds to the private member object of the instance for getters/setters
Getters/setters did not get much attention during the initial development of
ease.js, simply because there was such a strong focus on pre-ES5
compatibility---ease.js was created for a project that strongly required it.
Given that, getters/setters were not used, since those are ES5 features. As
such, I find that two things have happened:

  1. There was little incentive to provide a proper implementation; even though
     I noticed the issues during the initial development, they were left
     unresolved and were then forgotten about as the project lay dormant for a
     while.
  2. The project was dormant because it was working as intended (sure, there
     are still things on the TODO-list feature-wise). Since getters/setters were
     unused in the project for which ease.js was created, the bug was never
     found and so never addressed.

That said, I now am using getters/setters in a project with ease.js and noticed
a very odd bug that could not be explained by that project's implementation.
Sure enough, it was an ease.js issue and this commit resolves it.

Now, there is more to be said about this commit. Mainly, it should be noted that
MemberBuilder.buildGetterSetter, when compared with its method counterpart
(buildMethod) is incomplete---it does not properly address overrides, the
abstract keyword, proxies or the possibility of method hiding. This is certainly
something that I will get to, but I want to get this fix out as soon as I can.
Since overriding ES5 getters/setters (rather than explicit methods) is more
likely to be a rarity, and since a partial fix is better than no fix, this will
likely be tagged immediately and a further fix will follow in the (hopefully
near) future.

(This is an interesting example of how glaring bugs manage to slip through the
cracks, even when the developer is initially aware of them.)
2013-01-19 22:38:35 -05:00
Mike Gerwitz 8b74ed9f1b
Corrected a bug whereby getters were being inadvertently invoked by util.propParse()
Nasty; hopefully this was found before it did any harm to anyone else! This bug was discovered accidentally while I was debugging a separate issue.
2013-01-19 22:38:31 -05:00
Mike Gerwitz 02e22e64b9
Corrected warning console output invocation 2013-01-19 22:38:26 -05:00
Mike Gerwitz 8c869ac3be
Split COPYING into two separate files: COPYING and COPYING.LGPL
As suggested by Savannah administrator
2012-06-13 22:27:48 -04:00
Mike Gerwitz a75375fe6f
Added README to scripts/ directory 2012-05-11 20:53:02 -04:00
Mike Gerwitz 6c7ccdcb3b
Added GNU GPL v3+ license header and copyright notice to all scripts and Makefiles
Note: ease.js is licensed under the LGPL. Many of its external scripts are under the GPL.
2012-05-11 19:11:12 -04:00
Mike Gerwitz d5f1d514d9
Added GNU GPL v3 to COPYING
The GNU GPL is used for tools and other scripts that will not have any impact on
the LGPL'd portions of ease.js.
2012-05-11 19:10:48 -04:00
Mike Gerwitz 12335412d6
LICENSE -> COPYING 2012-05-11 18:34:29 -04:00
Mike Gerwitz d63c844144
Documentation correction regarding class dfn keywords 2012-05-08 18:01:29 -04:00
Mike Gerwitz 16867e284b
Added doc-html target to Makefile 2012-05-07 21:50:13 -04:00
Mike Gerwitz 4159e7c26f
Added chk-linelen tool
The maximum line length for source files in this project is 80 characters
2012-05-03 21:47:51 -04:00
Mike Gerwitz 28bf9e6421
Converted a number of test cases to new XUnit-style format 2012-05-03 21:47:43 -04:00
Mike Gerwitz 0d306b63c8
Moved setup method for XUnit style testing into tryTest() function to properly handle exceptions
- Most importantly in this case, skips
2012-05-03 21:47:36 -04:00
Mike Gerwitz e67c14e8c3
Added support for static proxy methods
When the static keyword is provided, the proxy will use the static accessor
method to look up the requested member.
2012-05-03 14:13:47 -04:00
Mike Gerwitz d84b86b21b
Added `proxy' keyword support
The concept of proxy methods will become an important, core concept in ease.js
that will provide strong benefits for creating decorators and proxies, removing
boilerplate code and providing useful metadata to the system. Consider the
following example:

  Class( 'Foo',
  {
      // ...

      'public performOperation': function( bar )
      {
          this._doSomethingWith( bar );
          return this;
      },
  } );

  Class( 'FooDecorator',
  {
      'private _foo': null,

      // ...

      'public performOperation': function( bar )
      {
          return this._foo.performOperation( bar );
      },
  } );

In the above example, `FooDecorator` is a decorator for `Foo`. Assume that the
`getValueOf()` method is undecorated and simply needs to be proxied to its
component --- an instance of `Foo`. (It is not uncommon that a decorator, proxy,
or related class will alter certain functionality while leaving much of it
unchanged.) In order to do so, we can use this generic, boilerplate code

  return this.obj.func.apply( this.obj, arguments );

which would need to be repeated again and again for *each method that needs to
be proxied*. We also have another problem --- `Foo.getValueOf()` returns
*itself*, which `FooDecorator` *also* returns.  This breaks encapsulation, so we
instead need to return ourself:

  'public performOperation': function( bar )
  {
      this._foo.performOperation( bar );
      return this;
  },

Our boilerplate code then becomes:

  var ret = this.obj.func.apply( this.obj, arguments );
  return ( ret === this.obj )
      ? this
      : ret;

Alternatively, we could use the `proxy' keyword:

  Class( 'FooDecorator2',
  {
      'private _foo': null,

      // ...

      'public proxy performOperation': '_foo',
  } );

`FooDecorator2.getValueOf()` and `FooDecorator.getValueOf()` both perform the
exact same task --- proxy the entire call to another object and return its
result, unless the result is the component, in which case the decorator itself
is returned.

Proxies, as of this commit, accomplish the following:
  - All arguments are forwarded to the destination
  - The return value is forwarded to the caller
    - If the destination returns a reference to itself, it will be replaced with
      a reference to the caller's context (`this`).
  - If the call is expected to fail, either because the destination is not an
    object or because the requested method is not a function, a useful error
    will be immediately thrown (rather than the potentially cryptic one that
    would otherwise result, requiring analysis of the stack trace).

N.B. As of this commit, static proxies do not yet function properly.
2012-05-03 09:49:22 -04:00
Mike Gerwitz bd0158928c
Added signchk tool
This tool can help to ensure that commits have not been falsely authored. For
example, if you receive an ease.js repository from a friend, there is no way to
verify that a commit from "Mike Gerwitz" is actually a commit from myself unless
it has been signed using my private key. This additional check will help to
ensure the integrity of the repository.

Please note that automated systems should *not* invoke this utility directly
from this repository, unless it is invoked using a previously trusted commit.
Otherwise, an attacker need only alter the script to competely evade the check.
2012-04-18 23:46:50 -04:00
Mike Gerwitz 1b17900294 Resolved version test error caused by verset commit 2012-04-06 00:21:05 -04:00
Mike Gerwitz bc44bfd8e9 Set version to 0.2.0-dev 2012-03-05 22:55:14 -05:00
Mike Gerwitz 3740e0c9e0 manual.texi now looking for version.texi 2012-03-05 22:55:08 -05:00
Mike Gerwitz 2adcf8bb0e Added verset
After dealing with autoconf, I may decide not to implement it. The build process
is fairly simple as it is and I do not want to over-complicate it. verset solves
one of the issues that autconf would have aided in addressing - setting a
version number.
2012-03-05 22:54:12 -05:00
Mike Gerwitz 22005e396e Added missing closing parenthesis in Visibility Object Implementation section of manual 2012-01-19 23:25:47 -05:00
Mike Gerwitz 0ceffe2146 Visibility Object Implementation doc correction 2012-01-19 23:24:56 -05:00
Mike Gerwitz fa9dbcbf2e [Fix #37] constructor property now properly set on instances 2012-01-19 23:21:04 -05:00
Mike Gerwitz 9dbd0d1fb3 Added constructor property to reserved members list 2012-01-17 23:36:01 -05:00
Mike Gerwitz 958521f673 Created version module to provide additional version information 2011-12-23 18:31:11 -05:00
Mike Gerwitz 4627958247 Updated version in documentation and package.json to v0.1.0
- We are nearly there. Happy holidays and happy new year from ease.js ;)
2011-12-23 00:09:11 -05:00
Mike Gerwitz cdbcada4d2 Copyright year update 2011-12-23 00:09:11 -05:00
Mike Gerwitz f264c1bf63 Added version number to exports 2011-12-23 00:03:08 -05:00