Skip to content

Commit

Permalink
Use real type=module package
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Mar 4, 2024
1 parent 5ec4703 commit 8386f99
Show file tree
Hide file tree
Showing 8 changed files with 266 additions and 100 deletions.
3 changes: 3 additions & 0 deletions ember-string/.attw.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ignoreRules": ["cjs-resolves-to-esm"]
}
5 changes: 0 additions & 5 deletions ember-string/.template-lintrc.cjs

This file was deleted.

4 changes: 0 additions & 4 deletions ember-string/addon-main.cjs

This file was deleted.

16 changes: 3 additions & 13 deletions ember-string/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
"name": "@ember/string",
"version": "3.1.1",
"description": "A set of utilities to transform strings",
"keywords": [
"ember-addon"
],
"type": "module",
"repository": "https://github.com/emberjs/ember-string",
"license": "MIT",
"author": "",
Expand Down Expand Up @@ -35,14 +33,15 @@
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"lint:types": "tsc --noEmit --emitDeclarationOnly false",
"lint:package": "publint",
"lint:published-types": "attw --pack",
"start": "concurrently 'npm:start:*'",
"start:js": "rollup --config --watch --no-watch.clearScreen",
"start:types": "tsc --declaration --watch",
"test": "echo 'A v2 addon does not have tests, run tests in test-app'",
"prepack": "rollup --config"
},
"dependencies": {
"@embroider/addon-shim": "^1.8.7",
"decorator-transforms": "^1.0.1"
},
"devDependencies": {
Expand Down Expand Up @@ -72,15 +71,6 @@
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
"ember": {
"edition": "octane"
},
"ember-addon": {
"version": 2,
"type": "addon",
"main": "addon-main.cjs",
"app-js": {}
},
"volta": {
"extends": "../package.json"
}
Expand Down
54 changes: 0 additions & 54 deletions ember-string/rollup.config.js

This file was deleted.

20 changes: 0 additions & 20 deletions ember-string/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,6 @@ export default {
// See https://github.com/embroider-build/embroider/blob/main/docs/v2-faq.md#how-can-i-define-the-public-exports-of-my-addon
addon.publicEntrypoints(['**/*.js', 'index.js', 'template-registry.js']),

// These are the modules that should get reexported into the traditional
// "app" tree. Things in here should also be in publicEntrypoints above, but
// not everything in publicEntrypoints necessarily needs to go here.
addon.appReexports([
'components/**/*.js',
'helpers/**/*.js',
'modifiers/**/*.js',
'services/**/*.js',
]),

// Follow the V2 Addon rules about dependencies. Your code can import from
// `dependencies` and `peerDependencies` as well as standard Ember-provided
// package names.
Expand All @@ -48,16 +38,6 @@ export default {
babelHelpers: 'bundled',
}),

// Ensure that standalone .hbs files are properly integrated as Javascript.
addon.hbs(),

// Ensure that .gjs files are properly integrated as Javascript
addon.gjs(),

// addons are allowed to contain imports of .css files, which we want rollup
// to leave alone and keep in the published output.
addon.keepAssets(['**/*.css']),

// Remove leftover build artifacts when starting a new build.
addon.clean(),

Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,9 @@
"overrides": {
"@types/eslint": "^7.0.0"
}
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.15.0",
"publint": "^0.2.7"
}
}
Loading

0 comments on commit 8386f99

Please sign in to comment.