-
Notifications
You must be signed in to change notification settings - Fork 0
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
[TR-6197] Moving from AMD to ESM #190
base: develop
Are you sure you want to change the base?
Changes from 2 commits
3a178dd
9d91ea2
d536bd9
463c3ce
ea07a2c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,15 @@ | |
"displayName": "TAO Core SDK", | ||
"description": "Core libraries of TAO", | ||
"homepage": "https://github.com/oat-sa/tao-core-sdk-fe#readme", | ||
"type": "module", | ||
"files": [ | ||
"dist/", | ||
"src/" | ||
], | ||
"exports": { | ||
"./core/*": "./src/core/*.js", | ||
"./util/*": "./src/util/*.js" | ||
}, | ||
"license": "GPL-2.0", | ||
"scripts": { | ||
"test": "npx qunit-testrunner", | ||
|
@@ -47,11 +52,11 @@ | |
"@oat-sa/eslint-config-tao": "^2.0.0", | ||
"@oat-sa/prettier-config": "^0.1.1", | ||
"@oat-sa/tao-qunit-testrunner": "^2.0.0", | ||
"async": "^0.2.10", | ||
"async": "^3.2.6", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe there was a specific reason we kept the |
||
"eslint": "^8.39.0", | ||
"fetch-mock": "^9.11.0", | ||
"glob": "^8.1.0", | ||
"handlebars": "1.3.0", | ||
"handlebars": "4.7.7", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For handlebars I don't think we can upgrade this easily. It requires a big effort to synchronise across all TAO 3.x repos, see https://oat-sa.atlassian.net/wiki/spaces/FOUN/pages/144081031/Upgrade+Handlebars (a task which ended up blocked the last 2 times). |
||
"jquery-mockjax": "^2.6.0", | ||
"jquery-simulate": "^1.0.2", | ||
"node-qunit-puppeteer": "^1.0.13", | ||
|
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -13,14 +13,14 @@ | |||||||||
* along with this program; if not, write to the Free Software | ||||||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||||||||
* | ||||||||||
* Copyright (c) 2016-2019 (original work) Open Assessment Technologies SA ; | ||||||||||
* Copyright (c) 2016-2024 (original work) Open Assessment Technologies SA ; | ||||||||||
*/ | ||||||||||
/** | ||||||||||
* @author Jean-Sébastien Conan <jean-sebastien.conan@vesperiagroup.com> | ||||||||||
*/ | ||||||||||
import _ from 'lodash'; | ||||||||||
import Promise from 'core/promise'; | ||||||||||
import eventifier from 'core/eventifier'; | ||||||||||
import Promise from './promise'; | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. question: Is this still needed? |
||||||||||
import eventifier from './eventifier'; | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue: I don't think the URI can be changed. Remember, the consumer still needs to access AMD-compatible URIs. Renaming the routes may create issues. I'm curious to know why such a change is necessary. update: Ok, this is required by the ticket, actually. While it is worth checking with the Terre consumers, we should also add the file extension to each import as this is recommended by the standard and required by Vite. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: to properly follow the requirements, we also need to add the file extension
Suggested change
|
||||||||||
|
||||||||||
/** | ||||||||||
* Defines a manager for async process with deferred steps. | ||||||||||
|
@@ -34,8 +34,8 @@ import eventifier from 'core/eventifier'; | |||||||||
* @trigger reject - When the process has finished on error | ||||||||||
*/ | ||||||||||
function asyncProcessFactory() { | ||||||||||
var running = false; | ||||||||||
var steps = []; | ||||||||||
let running = false; | ||||||||||
let steps = []; | ||||||||||
|
||||||||||
return eventifier({ | ||||||||||
/** | ||||||||||
|
@@ -52,7 +52,7 @@ function asyncProcessFactory() { | |||||||||
* @returns {boolean} - Returns true if the process can be started | ||||||||||
*/ | ||||||||||
start: function start(cb) { | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. quibble: Converting the code to use
Suggested change
|
||||||||||
var started = false; | ||||||||||
let started = false; | ||||||||||
if (!running) { | ||||||||||
steps = []; | ||||||||||
running = true; | ||||||||||
|
@@ -94,8 +94,8 @@ function asyncProcessFactory() { | |||||||||
* @returns {Promise} - Returns the finish promise | ||||||||||
*/ | ||||||||||
done: function done(cb) { | ||||||||||
var self = this; | ||||||||||
var finish = Promise.all(steps); | ||||||||||
const self = this; | ||||||||||
const finish = Promise.all(steps); | ||||||||||
|
||||||||||
finish | ||||||||||
.then(function(data) { | ||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.