Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub Actions workflows to migrate away from Travis-CI #587

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
d477de8
Dispatch event on <enter>
bmson Jul 27, 2016
d51c7ce
Bump version
bmson Jul 27, 2016
398fe58
Merge pull request #1 from bmson/rebase
bmson Jul 28, 2016
7cc45df
Merge pull request #2 from bmson/enter
bmson Jul 28, 2016
e56ed5b
Merge pull request #3 from bmson/bump
bmson Jul 28, 2016
51489f3
Merge branch 'master' of https://github.com/ichord/At.js
bmson May 15, 2017
419c52e
Resolve incorrect peer dependency error
alanhogan Oct 24, 2017
8dd6fae
Merge pull request #4 from zendesk/jquery-peer-dep
alanhogan Oct 25, 2017
9c7e016
Not shadowing event parameter passed to dispatch
shajith Mar 27, 2018
9594ad1
Merge pull request #5 from zendesk/shajith/fix-set-timeout-bug
shajith Mar 27, 2018
740810e
Move jquery from peer to dev dependecy
AbhiPrasad Jun 7, 2018
6d1eb5c
Merge pull request #6 from zendesk/abhi/remove-jquery
AbhiPrasad Jun 7, 2018
9f873b1
Change version for jquery update
AbhiPrasad Jun 7, 2018
6b5d182
Revert #423 PR of ichord/At.js
cubeguerrero Jul 20, 2018
08e1eed
Update version in package.json from 1.5.4 to 1.5.5
cubeguerrero Jul 23, 2018
3dc758f
Merge pull request #7 from zendesk/cubeguerero/ZD2703623-deleting_spa…
cubeguerrero Jul 24, 2018
09e5274
Change zwj to zws
albertldlan Nov 28, 2018
63edc12
Merge pull request #8 from zendesk/albert/change-zwj
albertldlan Nov 28, 2018
dd60a93
Add a guard for the presence of the event object
vcekov Dec 7, 2018
dba6e3f
Merge pull request #9 from zendesk/val/fix_catch_query
vcekov Dec 7, 2018
272536a
Add GitHub Actions workflows to migrate away from Travis-CI
everops-john Jul 27, 2020
c025d6f
trigger actions
everops-john Jul 27, 2020
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
26 changes: 26 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: repo-checks

on:
push:
branches:
- master
- stable
- beta
pull_request:

jobs:
main:
name: node_js
runs-on: [self-hosted, zendesk-stable]
steps:
- uses: zendesk/checkout@v2
- uses: zendesk/[email protected]
with:
node-version: '4'
- name: test
run: |
npm install -g gulp
npm install -g bower
bower install
npm test

16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
**An autocompletion library to autocomplete mentions, smileys etc. just like on Github!**
[![Build Status](https://travis-ci.org/ichord/At.js.png)](https://travis-ci.org/ichord/At.js)

![repo-checks](https://github.com/zendesk/At.js/workflows/repo-checks/badge.svg)
#### Notice

At.js now **depends on** [Caret.js](https://github.com/ichord/Caret.js).
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "At.js",
"version": "1.5.3",
"version": "1.5.7",
"main": [
"dist/js/jquery.atwho.js",
"dist/css/jquery.atwho.css"
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "At.js",
"repo": "ichord/At.js",
"description": "Add Github like mentions autocomplete to your application.",
"version": "1.5.3",
"version": "1.5.7",
"demo": "http://ichord.github.com/At.js",
"dependencies": {
"ichord/Caret.js": "~0.2.2",
Expand Down
15 changes: 9 additions & 6 deletions dist/js/jquery.atwho.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* at.js - 1.5.3
* Copyright (c) 2017 chord.luo <[email protected]>;
* at.js - 1.5.7
* Copyright (c) 2018 chord.luo <[email protected]>;
* Homepage: http://ichord.github.com/At.js
* License: MIT
*/
Expand All @@ -19,6 +19,7 @@
factory(jQuery);
}
}(this, function ($) {

var DEFAULT_CALLBACKS, KEY_CODE;

KEY_CODE = {
Expand Down Expand Up @@ -215,7 +216,7 @@ App = (function() {
})(this)).on('compositionend', (function(_this) {
return function(e) {
_this.isComposing = false;
setTimeout(function(e) {
setTimeout(function() {
return _this.dispatch(e);
});
return null;
Expand Down Expand Up @@ -294,7 +295,6 @@ App = (function() {
case KEY_CODE.DOWN:
case KEY_CODE.UP:
case KEY_CODE.CTRL:
case KEY_CODE.ENTER:
$.noop();
break;
case KEY_CODE.P:
Expand Down Expand Up @@ -710,6 +710,9 @@ EditableController = (function(superClass) {
if (!range.collapsed) {
return;
}
if (!e) {
return;
}
if (e.which === KEY_CODE.ENTER) {
($query = $(range.startContainer).closest('.atwho-query')).contents().unwrap();
if ($query.is(':empty')) {
Expand Down Expand Up @@ -832,13 +835,13 @@ EditableController = (function(superClass) {
}
suffix = (suffix = this.getOpt('suffix')) === "" ? suffix : suffix || "\u00A0";
data = $li.data('item-data');
this.query.el.removeClass('atwho-query').addClass('atwho-inserted').html(content).attr('data-atwho-at-query', "" + data['atwho-at'] + this.query.text).attr('contenteditable', "false");
this.query.el.removeClass('atwho-query').addClass('atwho-inserted').html(content).attr('data-atwho-at-query', "" + data['atwho-at'] + this.query.text);
if (range = this._getRange()) {
if (this.query.el.length) {
range.setEndAfter(this.query.el[0]);
}
range.collapse(false);
range.insertNode(suffixNode = this.app.document.createTextNode("" + suffix));
range.insertNode(suffixNode = this.app.document.createTextNode("\u200B" + suffix));
this._setRange('after', suffixNode, range);
}
if (!this.$inputor.is(':focus')) {
Expand Down
2 changes: 1 addition & 1 deletion dist/js/jquery.atwho.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ gulp.task('umd', function() {

gulp.task('bump', function() {
gulp.src(['bower.json', 'component.json', 'package.json'])
.pipe(bump({version: "1.5.3"}))
.pipe(bump({version: "1.5.7"}))
.pipe(gulp.dest('./'));
});

Expand Down
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"homepage": "http://ichord.github.com/At.js",
"license": "MIT",
"version": "1.5.3",
"version": "1.5.7",
"repository": {
"type": "git",
"url": "https://github.com/ichord/At.js"
Expand All @@ -18,9 +18,6 @@
"scripts": {
"test": "gulp test"
},
"peerDependencies": {
"jquery": "^1.7.0"
},
"devDependencies": {
"gulp": "^3.9.0",
"gulp-bump": "^1.0.0",
Expand All @@ -37,6 +34,7 @@
"gulp-util": "^3.0.7",
"jasmine-ajax": "^3.2.0",
"jasmine-jquery": "^2.1.1",
"jquery": ">=1.7.0",
"phantomjs": "^1.9.19"
},
"spm": {
Expand Down
4 changes: 2 additions & 2 deletions src/app.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class App
null
.on 'compositionend', (e) =>
@isComposing = false
setTimeout((e) => @dispatch(e))
setTimeout(() => @dispatch(e))
null
.on 'keyup.atwhoInner', (e) =>
this.onKeyup(e)
Expand Down Expand Up @@ -113,7 +113,7 @@ class App
when KEY_CODE.ESC
e.preventDefault()
this.controller()?.view.hide()
when KEY_CODE.DOWN, KEY_CODE.UP, KEY_CODE.CTRL, KEY_CODE.ENTER
when KEY_CODE.DOWN, KEY_CODE.UP, KEY_CODE.CTRL
$.noop()
when KEY_CODE.P, KEY_CODE.N
this.dispatch e if not e.ctrlKey
Expand Down
4 changes: 2 additions & 2 deletions src/editableController.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class EditableController extends Controller
catchQuery: (e) ->
return unless range = @_getRange()
return unless range.collapsed
return unless e

if e.which == KEY_CODE.ENTER
($query = $(range.startContainer).closest '.atwho-query')
Expand Down Expand Up @@ -163,12 +164,11 @@ class EditableController extends Controller
.addClass 'atwho-inserted'
.html content
.attr 'data-atwho-at-query', "" + data['atwho-at'] + @query.text
.attr 'contenteditable', "false"
if range = @_getRange()
if @query.el.length
range.setEndAfter @query.el[0]
range.collapse false
range.insertNode suffixNode = @app.document.createTextNode "" + suffix
range.insertNode suffixNode = @app.document.createTextNode "\u200B" + suffix
@_setRange 'after', suffixNode, range
@$inputor.focus() unless @$inputor.is ':focus'
@$inputor.change()