Skip to content

Commit

Permalink
fix(chore): remove package alias for babel.
Browse files Browse the repository at this point in the history
  • Loading branch information
gchoqueux committed Nov 13, 2024
1 parent 0eb463b commit 03ac191
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 21 deletions.
6 changes: 4 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const path = require('path');

module.exports = {

// Global ESLint settings
Expand All @@ -17,8 +19,8 @@ module.exports = {
'import/resolver': {
'babel-module': {
alias: {
'@itowns/geodesy': 'packages/Geodesy/src/Main.js',
itowns: 'packages/Main/src/Main.js',
'@itowns/geodesy': path.resolve(__dirname, 'packages/Geodesy/src/Main.js'),
itowns: path.resolve(__dirname, 'packages/Main/src/Main.js'),
},
plugins: [
['module-extension-resolver'],
Expand Down
6 changes: 5 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions packages/Debug/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
["module-resolver", {
"cwd": "packagejson",
"root": ["./src"],
"extensions": [".js", ".ts", ".tsx"],
"alias": {
"@itowns/geodesy": "../Geodesy/src/Main.js",
"itowns": "../Main/src/Main.js"
}
"extensions": [".js", ".ts", ".tsx"]
}],
["babel-plugin-inline-import", {
"extensions": [
Expand Down
7 changes: 0 additions & 7 deletions packages/Main/.babelrc.cjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
const BABEL_ENV = process.env.BABEL_ENV;

const alias_itowns_geodesy = `../Geodesy/${BABEL_ENV == 'test' ? 'lib' : 'src'}/Main.js`;

module.exports = (api) => {
api.cache(true);
return {
Expand All @@ -19,9 +15,6 @@ module.exports = (api) => {
cwd: 'packagejson',
root: ['./src'],
extensions: [".js", ".ts", ".tsx"],
alias: {
'@itowns/geodesy': alias_itowns_geodesy
}
}],
['babel-plugin-inline-import', {
extensions: [
Expand Down
2 changes: 1 addition & 1 deletion packages/Main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"scripts": {
"lint": "eslint \"src/**/*.{js,ts,tsx}\" \"test/**/*.js\"",
"transpile": "cross-env BABEL_DISABLE_CACHE=1 babel src --out-dir lib",
"test-unit": "cross-env BABEL_ENV=test npm run base-test-unit test/unit",
"test-unit": "npm run base-test-unit test/unit",
"base-test-unit": "cross-env BABEL_DISABLE_CACHE=1 mocha --timeout 5000 --file test/unit/bootstrap.js --import=../../config/babel-register/register.mjs",
"test-with-coverage": "c8 -n src -r html cross-env npm run test-unit",
"test-with-coverage_lcov": "c8 -n src --reporter=lcov cross-env npm run test-unit",
Expand Down
6 changes: 1 addition & 5 deletions packages/Widget/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
["module-resolver", {
"cwd": "packagejson",
"root": ["./src"],
"extensions": [".js", ".ts", ".tsx"],
"alias": {
"@itowns/geodesy": "../Geodesy/src/Main.js",
"itowns": "../Main/src/Main.js"
}
"extensions": [".js", ".ts", ".tsx"]
}],
["babel-plugin-inline-import", {
"extensions": [
Expand Down
4 changes: 4 additions & 0 deletions packages/Widget/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,9 @@
"bugs": {
"url": "https://github.com/itowns/itowns/issues"
},
"dependencies": {
"@itowns/geodesy": "^2.44.2",
"itowns": "^2.44.2"
},
"homepage": "https://itowns.github.io/"
}

0 comments on commit 03ac191

Please sign in to comment.