Skip to content

Commit

Permalink
Merge pull request #4 from mkslanc/demo-toolbar
Browse files Browse the repository at this point in the history
Diff viewer
  • Loading branch information
nightwing authored Dec 31, 2024
2 parents 34b947c + 0ba7278 commit 49435e2
Show file tree
Hide file tree
Showing 141 changed files with 11,533 additions and 2,683 deletions.
18 changes: 9 additions & 9 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"rules": {
curly: 0,
eqeqeq: 0,
comma-dangle: 2,
//comma-dangle: 2,
no-dupe-args: 2,
no-dupe-keys: 2,
no-duplicate-case: 2,
Expand All @@ -56,7 +56,7 @@
no-unexpected-multiline: 2,
use-isnan: 2,
valid-typeof: 2,

accessor-pairs: 2,
complexity: 0,
dot-location: [2, "property"],
Expand All @@ -80,11 +80,11 @@
no-sequences: 2,
no-useless-call: 2,
yoda: 2,

no-undef: 2,
no-redeclare: 0,
no-unused-vars: [1, {"args": "none", "vars": "all"}],

no-debugger: 2,

//////////////////////////////////////////////////////////////////
Expand All @@ -108,17 +108,17 @@
// no-else-return: 2,
// no-unused-expressions: 2,
// no-use-before-define: [2, { "functions": false, "classes": false, "variables": false }],

// array-bracket-spacing: 2, // enforce spacing inside array brackets (fixable)
// block-spacing: 2, // disallow or enforce spaces inside of single line blocks (fixable)
// brace-style: 2, // enforce one true brace style
// brace-style: 2, // enforce one true brace style
// camelcase: 2, // require camel case names
// comma-spacing: 2, // enforce spacing before and after comma (fixable)
// comma-style: 2, // enforce one true comma style
computed-property-spacing: 2, // require or disallow padding inside computed properties (fixable)
// consistent-this: 2, // enforce consistent naming when capturing the current execution context
// consistent-this: 2, // enforce consistent naming when capturing the current execution context
linebreak-style: 2, // disallow mixed 'LF' and 'CRLF' as linebreaks
// indent: ["error", 4, { "outerIIFEBody": 0 }], // specify tab or space width for your code (fixable)
// indent: ["error", 4, { "outerIIFEBody": 0 }], // specify tab or space width for your code (fixable)
// key-spacing: 2, // enforce spacing between keys and values in object literal properties
// new-cap: 2, // require a capital letter for constructors
// new-parens: 2, // disallow the omission of parentheses when invoking a constructor with no arguments
Expand Down Expand Up @@ -151,6 +151,6 @@
// space-infix-ops: 2, // require spaces around operators (fixable)
// space-unary-ops: 2, // require or disallow spaces before/after unary operators (fixable)
// spaced-comment: [2, "always", { markers: ["-", "*", "/", "{", "}", "#"], exceptions: ["}"] }]

}
}
15 changes: 11 additions & 4 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,17 @@ jobs:
fi
fi
# check types
- run: npm run update-types
- run: node_modules/.bin/tsc --noImplicitAny --strict --noUnusedLocals --noImplicitReturns --noUnusedParameters --noImplicitThis ace.d.ts
- run: npm run typecheck
- run: git diff --exit-code ./ace-modes.d.ts ./ace.d.ts
- run: |
set -x;
npx tsc -v;
npm run update-types;
git diff --color --exit-code ./ace*d.ts;
npm run typecheck;
node_modules/.bin/tsc --noImplicitAny --strict --noUnusedLocals --noImplicitReturns --noUnusedParameters --noImplicitThis ace.d.ts;
- run: |
set -x;
./tool/test-npm-package.sh
# upload to codecov
- uses: codecov/codecov-action@v3
with:
token: d8edca4b-8e97-41e5-b54e-34c7cf3b2d47
Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,32 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [1.36.5](https://github.com/ajaxorg/ace/compare/v1.36.4...v1.36.5) (2024-11-14)


### Features

* exposing getter setter for widget manager created using line widgets ([#5673](https://github.com/ajaxorg/ace/issues/5673)) ([f5d0c19](https://github.com/ajaxorg/ace/commit/f5d0c196c69d06a9dda1bdeb379fa20ecbf75590))


### Bug Fixes

* vue-directives regex bug ([#5671](https://github.com/ajaxorg/ace/issues/5671)) ([5e1e524](https://github.com/ajaxorg/ace/commit/5e1e524d7ef04e13291b5a979fb4166e973e61f0))

### [1.36.4](https://github.com/ajaxorg/ace/compare/v1.36.3...v1.36.4) (2024-11-04)


### Bug Fixes

* **a11y:** update aria-label of textinput on cursor move ([#5665](https://github.com/ajaxorg/ace/issues/5665)) ([6ff93a8](https://github.com/ajaxorg/ace/commit/6ff93a86fe8c4855789ee7e7c156f7b376c0f935))

### [1.36.3](https://github.com/ajaxorg/ace/compare/v1.36.2...v1.36.3) (2024-10-21)


### Bug Fixes

* `readdirSync` options `recursive: true` was added only in NodeJs v20.1.0 ([#5645](https://github.com/ajaxorg/ace/issues/5645)) ([2953f72](https://github.com/ajaxorg/ace/commit/2953f72877a90691432373cfe9182e60ea9b2d8f))

### [1.36.2](https://github.com/ajaxorg/ace/compare/v1.36.1...v1.36.2) (2024-08-30)


Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ Contributing

Ace is a community project and wouldn't be what it is without contributions! We actively encourage and support contributions. The Ace source code is released under the BSD License. This license is very simple, and is friendly to all kinds of projects, whether open source or not. Take charge of your editor and add your favorite language highlighting and keybindings!

Feel free to fork and improve/enhance Ace any way you want. If you feel that the editor or the Ace community will benefit from your changes, please open a pull request.
Feel free to fork and improve/enhance Ace any way you want. If you feel that the editor or the Ace community will benefit from your changes, please open a pull request. Do make sure that your changes are covered by test cases to pass the pull request checks which exists inorder to keep ace robust.

Happy coding, Cloud9
45 changes: 36 additions & 9 deletions Makefile.dryice.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ var fs = require("fs");
var path = require("path");
var copy = require('architect-build/copy');
var build = require('architect-build/build');
var {
updateDeclarationModuleNames,
generateDeclaration,
SEPARATE_MODULES
} = require('./tool/ace_declaration_generator');

var ACE_HOME = __dirname;
var BUILD_DIR = ACE_HOME + "/build";
Expand Down Expand Up @@ -174,20 +179,30 @@ function ace() {
}
}

function correctDeclarationsForBuild(path, additionalDeclarations) {
var definitions = fs.readFileSync(path, 'utf8');
var newDefinitions = updateDeclarationModuleNames(definitions);
if (additionalDeclarations) {
newDefinitions = newDefinitions + '\n' + additionalDeclarations;
}
fs.writeFileSync(path, newDefinitions);
}

function buildTypes() {
var aceCodeModeDefinitions = '/// <reference path="./ace-modes.d.ts" />';
var aceCodeExtensionDefinitions = '/// <reference path="./ace-extensions.d.ts" />';
// ace-builds package has different structure and can't use mode types defined for the ace-code.
// ace-builds modes are declared along with other modules in the ace-modules.d.ts file below.
var definitions = fs.readFileSync(ACE_HOME + '/ace.d.ts', 'utf8').replace(aceCodeModeDefinitions, '').replace(aceCodeExtensionDefinitions, '');
var paths = fs.readdirSync(BUILD_DIR + '/src-noconflict');
var moduleRef = '/// <reference path="./ace-modules.d.ts" />';

var typeDir = BUILD_DIR + "/types";

if (!fs.existsSync(typeDir)) {
fs.mkdirSync(typeDir);
}

fs.readdirSync(BUILD_DIR + '/src-noconflict/snippets').forEach(function(path) {
paths.push("snippets/" + path);
});

var moduleNameRegex = /^(mode|theme|ext|keybinding)-|^snippets\//;
var moduleNameRegex = /^(keybinding)-/;

var pathModules = [
"declare module 'ace-builds/webpack-resolver';",
Expand All @@ -199,9 +214,21 @@ function buildTypes() {
return "declare module 'ace-builds/src-noconflict/" + moduleName + "';";
}
}).filter(Boolean)).join("\n") + "\n";

fs.writeFileSync(BUILD_DIR + '/ace.d.ts', moduleRef + '\n' + definitions);
fs.writeFileSync(BUILD_DIR + '/ace-modules.d.ts', pathModules);

fs.copyFileSync(ACE_HOME + '/ace-internal.d.ts', BUILD_DIR + '/ace.d.ts');
generateDeclaration(BUILD_DIR + '/ace.d.ts');
fs.copyFileSync(ACE_HOME + '/ace-modes.d.ts', BUILD_DIR + '/ace-modes.d.ts');
correctDeclarationsForBuild(BUILD_DIR + '/ace.d.ts', pathModules);
correctDeclarationsForBuild(BUILD_DIR + '/ace-modes.d.ts');

let allModules = SEPARATE_MODULES;
allModules.push("modules"); // core modules
allModules.forEach(function (key) {
let fileName = '/ace-' + key + '.d.ts';
fs.copyFileSync(ACE_HOME + '/types' + fileName, BUILD_DIR + '/types' + fileName);
correctDeclarationsForBuild(BUILD_DIR + '/types' + fileName);
});

var esmUrls = [];

var loader = paths.map(function(path) {
Expand Down
20 changes: 0 additions & 20 deletions ace-extensions.d.ts

This file was deleted.

Loading

0 comments on commit 49435e2

Please sign in to comment.