Skip to content

Commit

Permalink
ci: remove closure compiler check
Browse files Browse the repository at this point in the history
not needed since we are no longer targeting lower ES levels
  • Loading branch information
owenpearson committed Jul 10, 2023
1 parent d9b0d36 commit ed9be58
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 30 deletions.
1 change: 0 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@ jobs:
- run: npm ci
- run: npm run lint
- run: npm run format:check
- run: npm run check-closure-compiler
- run: npx tsc --noEmit ably.d.ts build/ably-webworker.min.d.ts
- run: npm audit --production
5 changes: 2 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
4. Commit your changes (`git commit -am 'Add some feature'`)
5. Ensure you have added suitable tests and the test suite is passing(`npm test`)
6. Ensure the [type definitions](https://github.com/ably/ably-js/blob/main/ably.d.ts) have been updated if the public API has changed
7. Ensure you stick to the version of JS used by the library (currently ES5). (The minfication task (`npm run grunt -- closureCompiler:ably.js`) will enforce that you stick to ES5 syntax, but will not enforce that you don't use, for example, new methods)
8. Push the branch (`git push origin my-new-feature`)
9. Create a new Pull Request
7. Push the branch (`git push origin my-new-feature`)
8. Create a new Pull Request

## Release Process

Expand Down
24 changes: 1 addition & 23 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ var webpackConfig = require('./webpack.config');

module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-closure-tools');
grunt.loadNpmTasks('grunt-bump');
grunt.loadNpmTasks('grunt-webpack');

Expand All @@ -16,7 +15,6 @@ module.exports = function (grunt) {
fragments: 'src/platform/web/fragments',
static: 'build',
dest: 'build',
tools_compiler: __dirname + '/node_modules/google-closure-compiler/compiler.jar',
};

function compilerSpec(src, dest) {
Expand Down Expand Up @@ -51,24 +49,6 @@ module.exports = function (grunt) {
},
};

gruntConfig['closureCompiler'] = {
options: {
compilerFile: dirs.tools_compiler,
compilerOpts: {
compilation_level: 'SIMPLE_OPTIMIZATIONS',
/* By default, the compiler assumes you're using es6 and transpiles to
* es5, adding various (unnecessary and undesired) polyfills. Specify
* both in and out to es5 to avoid transpilation */
language_in: 'ECMASCRIPT5',
language_out: 'ECMASCRIPT5',
strict_mode_input: true,
checks_only: true,
warning_level: 'QUIET',
},
},
'ably.js': compilerSpec('<%= dirs.static %>/ably.js'),
};

gruntConfig.bump = {
options: {
files: ['package.json', 'README.md'],
Expand Down Expand Up @@ -112,9 +92,7 @@ module.exports = function (grunt) {

grunt.registerTask('build:browser', ['checkGitSubmodules', 'webpack:browser']);

grunt.registerTask('check-closure-compiler', ['build', 'closureCompiler:ably.js']);

grunt.registerTask('all', ['build', 'check-closure-compiler', 'requirejs']);
grunt.registerTask('all', ['build', 'requirejs']);

grunt.loadTasks('test/tasks');

Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,9 @@
"eslint-plugin-security": "^1.4.0",
"express": "^4.17.1",
"glob": "~4.4",
"google-closure-compiler": "^20180610.0.1",
"grunt": "^1.4.1",
"grunt-bump": "^0.3.1",
"grunt-cli": "~1.2.0",
"grunt-closure-tools": "^1.0.0",
"grunt-contrib-concat": "~0.5",
"grunt-shell": "~1.1",
"grunt-webpack": "^5.0.0",
Expand Down Expand Up @@ -93,7 +91,6 @@
"requirejs": "grunt requirejs",
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"check-closure-compiler": "grunt check-closure-compiler",
"prepare": "npm run build",
"format": "prettier --write --ignore-path .gitignore --ignore-path .prettierignore src test ably.d.ts webpack.config.js Gruntfile.js scripts/cdn_deploy.js docs/chrome-mv3.md",
"format:check": "prettier --check --ignore-path .gitignore --ignore-path .prettierignore src test ably.d.ts webpack.config.js Gruntfile.js scripts/cdn_deploy.js",
Expand Down

0 comments on commit ed9be58

Please sign in to comment.