Giter VIP home page Giter VIP logo

git-release-notes's Introduction

Aria Templates - JavaScript Framework

ci codecov Dependencies devDependencies

npm

Aria Templates (aka AT) is an application framework written in JavaScript for building rich and large-scaled enterprise web applications. Developed since 2009 by Amadeus for its professional products, it has been designed to build web apps used intensively that need to display and process a high amount of data with a minimum of bandwidth consumption.

Some details

Aria Templates in a nutshell:

  • MVC based framework
  • powerful templating engine
  • data binding and automatic refresh
  • widgets libraries
  • lots of utilities libraries

The MVC's terminology in AT:

  • model -> JSON-based data model stored in DOM nodes corresponding to templates
  • view -> template (.tpl file)
  • controller -> module controllers and template scripts (.js files)

Templates can either be evaluated client-side or precompiled at build time.

Getting started

To get started with Aria Templates, you have several options:

  • you can clone our Git repository / download a ZIP from GitHub and then include bootstrap.js file in your HTML page, to run the original, development source code,
  • after obtaining our source code, you may run Grunt build and then include a packaged, minified (much faster) version of the framework in your page,
  • or to use the framework in your NodeJS application, issue npm install ariatemplates in the command line, then call require('ariatemplates') from your code to load the framework.

Head to README.md files in src and build folders to read more.

License

Apache License 2.0

Browser support

  • Firefox latest
  • Chrome latest
  • Edge latest

For accessibility, we support the combination of Edge (latest) with Jaws 2021.

Dependencies

The framework itself doesn't have any external dependencies.

We use Grunt, JSHint, UglifyJS, attester and a couple of other tools for building and testing.

Tools & apps

Syntax highlighters:

Other tools:

Feel invited to contribute highlighters for editor of your choice, or other useful tools!

Testing

  • Attester is the tool we use for running Aria Templates tests. You may also use it for running tests of your project.
  • Aria Templates TDD guide can help you writing tests for AT widgets and templates

Releases & backward compatibility

We release a new minor version (1.3.5, 1.3.6, ...) every 3 weeks, containing new features and bugfixes. Each version is thoroughly tested before the release. These releases are backward compatible. Occasionally we also backport important fixes to some of the older releases (1.3.1A, 1.3.1B etc.) - see tags.

Twice or three times a year, we issue a non-backward-compatible release, bump the the second digit (e.g. 1.3.x -> 1.4.1) and provide migration guide.

Before removal, items are marked as deprecated for at least 9 weeks (usually much more). We inform about deprecation in the docs, release notes and by flooding your console -- you won't overlook it.

Support & contributing

If you spotted some code problems in the framework, please open an AT issue or ideally, a pull request with the fix and a test.

See more in CONTRIBUTING.md and TDD guide for Aria Templates.

git-release-notes's People

Contributors

bornskilled200 avatar dependabot[bot] avatar divdavem avatar dvoiss avatar jakub-g avatar mapleeit avatar neutmute avatar piuccio avatar rs2 avatar tettaji avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

git-release-notes's Issues

TypeError: Cannot read property 'messageLines' of undefined

First time command works properly,
git-release-notes v1.0..v1.1 markdown

But when running same command again throws error

TypeError: Cannot read property 'messageLines' of undefined
    at /home/.nvm/versions/node/v4.0.0/lib/node_modules/git-release-notes/lib/git.js:43:17
    at Array.forEach (native)
    at processCommits (/home/.nvm/versions/node/v4.0.0/lib/node_modules/git-release-notes/lib/git.js:35:9)
    at ChildProcess.<anonymous> (/home/.nvm/versions/node/v4.0.0/lib/node_modules/git-release-notes/lib/git.js:17:18)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

Any suggestions?

bootstrap template

Thanks for this tool. I updated the base template for my own use to use bootstrap and datatables and it looks a lot nicer.

Would you like a PR to add this sample?
It uses CDN sources for script/css and so is still a self contained one pager.

The PR would contain a single new file: /templates/html-bootstrap.ejs

Expose a node API

Would you be open to exposing a node API for generating the release notes?

It'd be nice to be able to build tools on top of this project, without having to use subprocesses.

How can I get the tags

How can I get the tags into the callback ?
I want to retrieve all commits from 0.0.0 tag to HEAD,
and I want to get tag with commit id when exists.

I tried to use
const OPTIONS = { branch: 'master', o: ['tags'] };
const RANGE = '0.0.0...';

but it return the same result without tags.

tks !

Empty output

After using git-release-notes successfully for several months, this morning I am unable to get it to work. Whenever I run the command, I get no output. Either on the command line or when attempted to output to a disk, the command returns a completely empty result.

AFAIK, I made no changes to my system so this is a complete surprise.

Please advise.

Predefined templates

The README.md specifies few examples for big projects like Angular.

Would it be possible to have them as named templates?

Crash

$ git-release-notes 8da17b57f77db9f97820de37f4a69183489faaa8..4c385414d0f98ca20f6283db5e25e2bd5f547d3b html
/usr/local/lib/node_modules/git-release-notes/lib/git.js:43
workingCommit.messageLines.push(line.message);
^

TypeError: Cannot read property 'messageLines' of undefined
at /usr/local/lib/node_modules/git-release-notes/lib/git.js:43:17
at Array.forEach (native)
at processCommits (/usr/local/lib/node_modules/git-release-notes/lib/git.js:35:9)
at ChildProcess. (/usr/local/lib/node_modules/git-release-notes/lib/git.js:17:18)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

Maybe related to #8.

No license in repository

Hello, your repository doesn't currently have a license in the package.json or in repository itself. Could I suggest adding an MIT license or another open source license?

How to launch?

I'm running Ubuntu 14.04. I am not a nodejs programmer, so I need to know how to launch git-release-notes once installed. I installed this way:

$ sudo npm install -g git-release-notes
npm http GET https://registry.npmjs.org/git-release-notes
npm http 304 https://registry.npmjs.org/git-release-notes
npm http GET https://registry.npmjs.org/ejs
npm http GET https://registry.npmjs.org/optimist
npm http 200 https://registry.npmjs.org/ejs
npm http GET https://registry.npmjs.org/ejs/-/ejs-0.8.8.tgz
npm http 200 https://registry.npmjs.org/optimist
npm http 200 https://registry.npmjs.org/ejs/-/ejs-0.8.8.tgz
npm http GET https://registry.npmjs.org/wordwrap
npm http 200 https://registry.npmjs.org/wordwrap
/usr/bin/git-release-notes -> /usr/lib/node_modules/git-release-notes/index.js
[email protected] /usr/lib/node_modules/git-release-notes
├── [email protected]
└── [email protected] ([email protected])

The instructions seem to say to run from the command line this way, but this is obviously naive of me, so I kept trying:

$ git-release-notes HEAD~10..HEAD
git-release-notes: command not found

$ nodejs git-release-notes HEAD~10..HEAD

module.js:340
    throw err;
          ^
Error: Cannot find module '/home/mslinn/work/training/projects/public_code/play/course_play_scala_intro_code/git-release-notes'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:902:3
mslinn@oneiric course_play_scala_intro_code (master)

$ node git-release-notes HEAD~10..HEAD
mslinn@oneiric course_play_scala_intro_code (master)

add CI

I noticed that there is a travis config file in the project, but it seems never work. I'm willing to help fixing it.

TS types support

Noticed that there is no types definition either in the package nor on the DefinitelyTyped.

It would be a nice experience if we provide types define files. I could help to do that.

Output bootstrap html without Html, Head and Body tags

Hi there,

is it possible to output a Bootstrap HTML template so that that you only get the <div class="container" role="main"> div contents and nothing else?

I'd like to embed the output into a separate page (which I load as a Html.Partial)

Cheers!
-Chris

Invalid parameters, please specify an interval and the template

I don't know what I am doing wrong:

I cd'd to my git repository on my local machine and entered git-release-notes v1.0.0..v1.1.1 html > changelog.html. And yes, those release version tags do exist, even checked with git tag.

However, I always keep getting the message from the title. Does anyone have a clue?

html generated this wrong

when I generate the command to create the html, it looks strange and renders with çà those special characters.

Tag releases

Although there is just one at the moment, namely v0.0.1, it would be great to have it tagged.
As this tool is used also against tags, it is self-explanatory why they would be needed.

options.script use function in nodejs will print markdown

`const releaseNotes = require('git-release-notes')

const OPTIONS = {
branch: 'master',
script: (data, callback) => {
callback({
...data,
});
},
};
const RANGE = 'v1.0.0..v2.0.0';
const TEMPLATE = './markdown.ejs';
releaseNotes(OPTIONS, RANGE, TEMPLATE).then(changelog => {
console.log(Changelog between ${RANGE}\n\n${changelog});
}).catch(ex => {
console.error(ex);
process.exit(1);
});`

`var line = 1
, lines = "2020年03月11日21:59:51\n<%\nvar groupCommits = [{\n name: 'features',\n show: true,\n list: []\n}, {\n name: 'bugfix',\n show: true,\n list: []\n}, {\n name: 'refactoring',\n show: true,\n list: []\n}, {\n name: 'other',\n show: true,\n list: []\n}]\n\ncommits.forEach(function (commit) {\n\n\tvar result = (commit.title).match(/^(\w*)(\((.)\))?\: (.)$/);\n\n\tvar type = result && result[1];\n\tvar scope = result && result[3];\n\tvar title = result && result[4];\n\n\tif(type == 'fix' || type == 'fixed'){\n groupCommits.find(item => item.name === 'bugfix').list.push({\n\t\t\ttype: type,\n\t\t\tscope: scope,\n\t\t\ttitle: title,\n\t\t\tcommit: commit\n\t\t})\n\t} else if(type == 'feat' || type == 'feature'){\n groupCommits.find(item => item.name === 'features').list.push({\n\t\t\ttype: type,\n\t\t\tscope: scope,\n\t\t\ttitle: title,\n\t\t\tcommit: commit\n\t\t})\n\t} else if(type == 'refactor'){\n groupCommits.find(item => item.name === 'refactoring').list.push({\n\t\t\ttype: type,\n\t\t\tscope: scope,\n\t\t\ttitle: title,\n\t\t\tcommit: commit\n })\n\t} else {\n groupCommits.find(item => item.name === 'other').list.push({\n\t\t\ttype: type,\n\t\t\tscope: scope,\n\t\t\ttitle: title,\n\t\t\tcommit: commit\n })\n\t}\n});\n\n\nvar listCommits = function(list, key){\n\n\tlist.forEach(function (ct) {\n\n\tvar type = ct.type;\n\tvar scope = ct.scope;\n\tvar title = '';\n\tvar commit = ct.commit;\n\n\tif(type){\n\t\tif(key != 'other'){\n\t\t\ttitle = (scope? ''+scope+'
: ':'') + ct.title;\n\t\t}else{\n\t\t\ttitle = '' + type + (scope? '('+scope+')':'') + ' : ' + ct.title;\n\t\t}\n\t}else{\n\t\ttitle = commit.title;\n\t}\n%> - <% if(typeof commitHref === 'undefined' || commitHref === '') { %>[<%=commit.sha1.slice(0,8)%>]<% } else { %>[[```<%=commit.sha1.slice(0,8)%>```](<%=commitHref%><%=commit.sha1%>)]<%}%> - <%=title%> (<%= commit.authorName %>)\n<% })}\n\n\nfor(var i of groupCommits){\n if(i.list.length == 0) continue;\n\n\tif (i.name === 'bugfix' && i.show) { %>\n### Bug fixes\n\n<%\t} else if( i.name === 'features' && i.show) { %>\n\n### Features\n\n<%\t} else if(i.name === 'refactoring' && i.show) { %>\n\n### Code Refactoring\n\n<%\t} else if (i.name === 'other' && i.show) { %>\n\n### Other commits\n\n<%\t}\ni.show && listCommits(i.list, i);\n\n} %>\n"
, __filename = undefined;
try {
var __output = [], __append = __output.push.bind(__output);
with (locals || {}) {
; __append("2020年03月11日21:59:51\n")
; __line = 2
;
var groupCommits = [{
name: 'features',
show: true,
list: []
}, {
name: 'bugfix',
show: true,
list: []
}, {
name: 'refactoring',
show: true,
list: []
}, {
name: 'other',
show: true,
list: []
}]

commits.forEach(function (commit) {

    var result = (commit.title).match(/^(\w*)(\((.*)\))?\: (.*)$/);

    var type = result && result[1];
    var scope = result && result[3];
    var title = result && result[4];

    if(type == 'fix' || type == 'fixed'){
groupCommits.find(item => item.name === 'bugfix').list.push({
                    type: type,
                    scope: scope,
                    title: title,
                    commit: commit
            })
    } else if(type == 'feat' || type == 'feature'){
groupCommits.find(item => item.name === 'features').list.push({
                    type: type,
                    scope: scope,
                    title: title,
                    commit: commit
            })
    } else if(type == 'refactor'){
groupCommits.find(item => item.name === 'refactoring').list.push({
                    type: type,
                    scope: scope,
                    title: title,
                    commit: commit
})
    } else {
groupCommits.find(item => item.name === 'other').list.push({
                    type: type,
                    scope: scope,
                    title: title,
                    commit: commit
})
    }

});

var listCommits = function(list, key){

    list.forEach(function (ct) {

    var type = ct.type;
    var scope = ct.scope;
    var title = '';
    var commit = ct.commit;

    if(type){
            if(key != 'other'){
                    title = (scope? '__'+scope+'__: ':'') + ct.title;
            }else{
                    title = '__' + type + (scope? '('+scope+')':'') + '__ : ' + ct.title;
            }
    }else{
            title = commit.title;
    }

; __line = 79
; __append(" - ")
;  if(typeof commitHref === 'undefined' || commitHref === '') { 
; __append("[```")
; __append(escapeFn(commit.sha1.slice(0,8)))
; __append("```]")
;  } else { 
; __append("[[```")
; __append(escapeFn(commit.sha1.slice(0,8)))
; __append("```](")
; __append(escapeFn(commitHref))
; __append(escapeFn(commit.sha1))
; __append(")]")
; }
; __append(" __-__ ")
; __append(escapeFn(title))
; __append(" (")
; __append(escapeFn( commit.authorName ))
; __append(")\n")
; __line = 80
;  })}

for(var i of groupCommits){
if(i.list.length == 0) continue;

    if (i.name === 'bugfix' && i.show) { 
; __line = 86
; __append("\n### Bug fixes\n\n")
; __line = 89
;   } else if( i.name === 'features' && i.show) { 
; __append("\n\n### Features\n\n")
; __line = 93
;   } else if(i.name === 'refactoring' && i.show) { 
; __append("\n\n### Code Refactoring\n\n")
; __line = 97
;   } else if (i.name === 'other' && i.show) { 
; __append("\n\n### Other commits\n\n")
; __line = 101
;   }

i.show && listCommits(i.list, i);

}
; __line = 104
; __append("\n")
; __line = 105
}
return __output.join("");
} catch (e) {
rethrow(e, __lines, __filename, __line, escapeFn);
}

Changelog between v1.0.0..v2.0.0`

image

Crash when revisions are the same

I am trying to use this tool within Jenkins to generate a changelog between the last successful build and the git HEAD, so I need to be able to programmatically specify the first revision and always use HEAD as the second revision. Unfortunately, if the two revisions happen to be the same, a crash occurs and produces the following stack trace:

$ git-release-notes HEAD..HEAD markdown

/usr/lib/node_modules/git-release-notes/lib/git.js:43
            workingCommit.messageLines.push(line.message);
                         ^
TypeError: Cannot read property 'messageLines' of undefined
    at /usr/lib/node_modules/git-release-notes/lib/git.js:43:17
    at Array.forEach (native)
    at processCommits (/usr/lib/node_modules/git-release-notes/lib/git.js:35:9)
    at ChildProcess.<anonymous> (/usr/lib/node_modules/git-release-notes/lib/git.js:17:18)
    at ChildProcess.emit (events.js:98:17)
    at Process.ChildProcess._handle.onexit (child_process.js:810:12)

As for the expected behavior, I would love for it to still produce output (i.e. in the case of the html template, still generate the base document but with no content). However, I would also be okay with empty output, as long as it doesn't crash.

My workaround at the moment is to use git rev-parse HEAD to check if the hash is the same before running this tool.

Template Config

This project is working very well for me and looks great. One more requirement though is that in my company we have multiple repositories and I'd like to be able to have a single, reusable template for all repositories but with very small customisations per repository.

For example, in my custom template I have added links for each commit to the BitBucket project where our code is hosted. The URL is different per project eg:

To support this custom URL per repo, I would like to be able to pass parameters from the command line to the template directly - without git-release-notes needing to know about / parse them

I propose a third optional CLI parameter that would be a path to a JSON file that would be loaded from the file system, hydrated to a JSON object and then passed into the template as a variable named templateConfig. Interpretation is then strictly up to the template.

In my case I would pass in something like

{
  "repoName": "Project Apple",
  "gitRepoUrl": "http://bitbucket/acme-corp/project-apple"
}

but the structure could be anything that the template author requires.

Thoughts?

Make date formatting library available

Hey - I propose adding a date formatting library available as a local variable in the template
That would save a bit of code in the html-bootstrap template and be more flexible for consumers.

I'm not a react expert, I propose perhaps https://github.com/date-fns/date-fns ?
Looks like the most active currently.

There is also https://www.npmjs.com/package/dateformat

Open to suggestions - anything is better than the half baked code I added to the bootstrap template ;)

btw: I'm happy to do the PR for this

external script location

One problem I ran into in v1.1 was the external script path is relative to the current working directory.

I expected that to be an absolute path - the same as the ejs template

Was that by design?

Apart from that - it is working well and I could make my external script all typescript which is awesome.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.