Skip to content

Commit

Permalink
feat: remove type="module" in order omit the "fullySpecified" spec
Browse files Browse the repository at this point in the history
  • Loading branch information
tujoworker committed Jan 26, 2022
1 parent 040e69f commit b424e08
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 23 deletions.
7 changes: 0 additions & 7 deletions packages/dnb-eufemia/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,6 @@ const productionPlugins = [
mode: 'unsafe-wrap',
},
],
[
'babel-plugin-fully-specified',
{
ensureFileExists: ['umd'].includes(process.env.BABEL_ENV),
includePackages: ['date-fns'],
},
],
]

if (typeof process.env.BABEL_ENV !== 'undefined') {
Expand Down
1 change: 0 additions & 1 deletion packages/dnb-eufemia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@
"@wojtekmaj/enzyme-adapter-react-17": "0.6.5",
"audit-ci": "5.1.2",
"babel-jest": "27.3.1",
"babel-plugin-fully-specified": "1.3.0",
"babel-plugin-optimize-clsx": "2.6.2",
"babel-plugin-search-and-replace": "1.1.0",
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ describe('package.json', () => {
expect(fs.existsSync(path.resolve(packageJsonFile))).toBeTruthy()
})

it('has type="module"', () => {
expect(packageJson.type).toBe('module')
it('has no type="module"', () => {
expect(packageJson.type).toBeFalsy()
})

it('has not these deleted fields', () => {
Expand Down
3 changes: 0 additions & 3 deletions packages/dnb-eufemia/scripts/release/prepareForRelease.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ export async function cleanupPackage({ packageString, filepath }) {
delete packageJson.resolutions
delete packageJson.volta

// Add required fields
packageJson.type = 'module'

const prettierrc = JSON.parse(
await fs.readFile(
path.resolve(packpath.self(), '.prettierrc'),
Expand Down
10 changes: 0 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1960,7 +1960,6 @@ __metadata:
"@wojtekmaj/enzyme-adapter-react-17": 0.6.5
audit-ci: 5.1.2
babel-jest: 27.3.1
babel-plugin-fully-specified: 1.3.0
babel-plugin-optimize-clsx: 2.6.2
babel-plugin-search-and-replace: 1.1.0
babel-plugin-transform-react-remove-prop-types: 0.4.24
Expand Down Expand Up @@ -8081,15 +8080,6 @@ __metadata:
languageName: node
linkType: hard

"babel-plugin-fully-specified@npm:1.3.0":
version: 1.3.0
resolution: "babel-plugin-fully-specified@npm:1.3.0"
peerDependencies:
"@babel/core": "*"
checksum: a561b33da1f0e976d34721f55c25c4132c24194ad5d089ac7427db229a852dcb3e83044f9ca34e380e0eba31d789cbaf73b2d8efefb95952c7daedbf83ccd4b8
languageName: node
linkType: hard

"babel-plugin-istanbul@npm:^6.0.0":
version: 6.1.1
resolution: "babel-plugin-istanbul@npm:6.1.1"
Expand Down

0 comments on commit b424e08

Please sign in to comment.